Spectator System
When players die during an EOTW event, they can become spectators instead of being kicked. This allows them to continue watching the event.
Configuration
settings:
revive:
type: spectate # Options: spectate, kick
delay: 5 # Seconds before becoming spectator
invincibility: 5 # Invincibility after revive
staff_can_see_vanished: true
spectator_prefix: "&f👻 "
gamemode: "survival"
kick_message: "&#FF0000You have been kicked from the server."
spectator_item:
material: "COMPASS"
name: "&ePlayer Selector"
inventory_slot: 4
lore:
- "&7Right click to list all players."
Revive Types
Spectate Mode
Players become invisible spectators:
- Can fly around the map
- Cannot interact with anything
- Have a compass to teleport to alive players
- Visible only to staff with permission
Kick Mode
Players are removed from the server:
- Clean disconnect with custom message
- Cannot rejoin unless revived
Spectator Item
Dead players receive a special compass that opens a player selector GUI.
spectator_item:
material: "COMPASS"
name: "&ePlayer Selector"
inventory_slot: 4
lore:
- "&7Right click to list all players."
Player Selector GUI
Configure in guis/player_selector.yml:
title: "&8Player Selector"
size: 54
settings:
show_spectators: false
show_alive_only: true
player_item:
lore:
- ""
- "&fStatus: {status}"
- "&fTeam: {team}"
- "&fKills: {kills}"
- ""
- "&eClick to teleport"
Staff Features
See Vanished Players
Staff members with cocoeotw.staff permission can see spectators.
staff_can_see_vanished: true
Spectator Prefix
Spectators have a prefix in tab list:
spectator_prefix: "&f👻 "
Revive Command
Admins can revive spectators back to life:
/eotw revive <player>
Revive Process:
- Countdown (configurable delay)
- Teleport to spawn
- Restore inventory from database
- Grant temporary invincibility
- Set to survival mode
Messages
messages:
spectator:
gui_config_not_found: "%prefix% &#FF0000GUI config not found!"
target_offline: "%prefix% &#FF0000Player is offline!"
teleport_self: "%prefix% &#FF0000You cannot teleport to yourself!"
teleport_success: "%prefix% &fTeleported to FB22%target%&f."
status_alive: "FB22Alive"
status_spectator: "&#FF0000Spectator"
commands:
revive:
usage: "%prefix% &fUsage: /eotw revive <player>"
no_data: "%prefix% &fNo data found for {player}."
initiated: "%prefix% &fReviving {player}..."
countdown: "%prefix% &fRevived in &#FBCD08{time} &fseconds..."
success: "%prefix% &fYou have been revived."
invincibility-end: "%prefix% &fYour invincibility has ended."