The configuration file is located at /MBedwars/spectator-hotbar.yml
.
Each section inside the file represents an item that will be given. The name of the section is the id of the item. The id may be anything, the only requirements are that it only persists of ASCII characters and that it is unique (there may not be multiple items with the same id).
Each item may include these configs:
Name | Meaning | Default Value |
---|---|---|
name | The name that will be displayed. %<entry>% will be taken from the messages file. It is also possible to use color codes (e.g. &e for yellow) | id of the item |
slot | The position of the player's hotbar at which the item will be placed at. Must range between 0 and 8 | 0 |
handler | The id of the handler. Defines the effective behaviour when the item is being used. A list of all available ones can be found in the page below | null |
item | The material that shall be shown as the icon in the hotbar. It uses this syntax | "STONE" |
add-commands | Whether commands shall be executed when the item is being used. The commands will be run as if the player would wrote them himself, in case the config commands-as-console isn't set to true. Example: [ "say My name is {player}" ] | [ ] |
commands-as-console | Whether the commands from the add-commands shall be executed from the console (means with OP; value = true permissions) or as if the player would write the commands themselves (value = false). | false |
Name | Description |
---|---|
bedwars:view_players | Opens a GUI in which the spectator sees all currently playing players. Right clicking on them allows the spectator teleport himself to the target. |
bedwars:change_speed | Spectator may change his fly speed when clicking on it. You may configure the speed modes using the spectator-changespeed-types config inside the main config file. |
bedwars:next_round | Spectator joins the next best available arena to enter and to play in. Best one is determinated by the amount of players that are currently in that one. Of course ignores already full arenas. |
bedwars:leave | Spectator leaves the spectator mode. Item gets hidden for players who are playing inside an arena but entered the spectating mode as they died. |
Also available at: https://pastebin.com/d7PHHFAb
Click to open:
########################
# Visit the wiki page for further info: https://s.marcely.de/mbww14
########################
view-players: # The unique id of this item. Is not bound to the type of the handler, just has to be unique from others.
name: '%Spectator_Item_Teleporter%' # Will be shown when the player holds it on his hand / moves with his cursor over it
slot: 0 # The slot at which it's located at. Can go from 0 up to 8. 0 is the very left one.
handler: 'bedwars:view_players' # The handler of the item that determines what exactly happens when the item is being used.
item: 'watch' # The item stack that'll be placed at the given slot.
change-speed:
name: '%Spectator_Item_ChangeSpeed%'
slot: 1
handler: 'bedwars:change_speed'
item: 'arrow'
change-arena:
name: '%Spectator_Item_NextRound%'
slot: 7
handler: 'bedwars:next_round'
item: 'boat'
leave:
name: '%Spectator_Item_Leave%'
slot: 8
handler: 'bedwars:leave'
item: 'redstone'
# You're able to add custom items by simply copy & pasting the existing ones
# Only make sure that there aren't multiple items with the same id
# Furthmore, you might want to check out the API for adding your custom handlers