Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buyOn this page, you will find everything you need to know about the spectator_hotbar.yml file of Phoenix Duels.
spectator_hotbar.yml defines the items a player is given while they are spectating a match. Their real inventory is saved beforehand and given back the moment they stop spectating.
leave-item:
slot: 4
material: BARRIER
custom-model-data: 0
display-name: '&cLeave'
lore:
- '&7Click here to leave this game.'
- ''
- '&7Or do /leave.'
actions: []
items: {}
leave-item is handled by the plugin itself: clicking it removes the player from the match they are watching, whatever else you configure on it. You can change its slot, material, name and lore freely, but its behaviour is fixed.
To remove it entirely, set its slot to a value outside the hotbar, such as -1.
Everything under items is yours. Each entry is a normal item definition with an actions list, using the same action types as any menu item, and runs those actions when the spectator clicks it.
items:
players:
slot: 0
material: PLAYER_HEAD
display-name: '&aPlayers'
lore:
- '&7Jump between the players of this match.'
actions:
- '[MENU] spectator_players'
back-to-lobby:
slot: 8
material: RED_DYE
display-name: '&cBack to Lobby'
actions:
- '[COMMAND] player;leave'
Slots run from 0 on the far left of the hotbar to 8 on the far right. Anything outside that range is ignored, so the item simply never appears.
The spectator_players menu used above is a built-in menu that lists everyone in the match being watched, so a spectator can jump straight to a specific player.
Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buy