Date: 2023/04/12 14:59:48 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
player_title_create:
type: task
debug: false
script:
- stop if:<player.is_online.not>
- stop if:<player.has_flag[title]>
- spawn entity_hologram <player.eye_location.above> save:holo
#- spawn armor_stand[marker=true] <player.eye_location.above> save:holo
- define holo <entry[holo].spawned_entity>
#- invisible <[holo]> state:true
- adjust <player> hide_entity:<[holo]>
- attach <[holo]> to:<player> offset:0,2.35,0
- flag <player> title:<[holo]>
- run player_title_update
#- adjust <[holo]> custom_name_visible:true
player_title_update:
type: task
debug: false
definitions: name
script:
- stop if:<player.is_online.not>
- stop if:<player.has_flag[title].not>
- if <player.proc[player_has_grace]>:
- define txt <&[success]><bold>🛡
- else if <player.has_flag[pvp]>:
- define txt <&[red]><bold>🗡
- else:
- define txt <&[silver]><bold>🗡
- define txt <[name]> if:<[name].exists>
- define h_map <player.flag[title].display_entity_data>
- define h_map.text <[txt]>
- adjust <player.flag[title]> display_entity_data:<[h_map]>
#- adjust <player.flag[title]> custom_name:<[txt]>
player_title_remove:
type: task
debug: false
script:
- stop if:<player.is_online.not>
- stop if:<player.has_flag[title].not>
- remove <player.flag[title]>
- flag <player> title:!