Interface Spectator
public interface Spectator
Represents a spectating player and contains the info about him
- 
Method SummaryModifier and TypeMethodDescriptiongetArena()Returns the arena which the player is spectating.Returns the time when he got a spectator.Returns the player behind this data.Returns the reason or the cause of him being a spectator.@Nullable InstantReturns the time when he is supposed to be released from enforced spectating.booleanReturns if this Spectator instance is still present.default booleankick()Same askick(KickSpectatorReason).booleankick(KickSpectatorReason reason) Stops the player from spectating any further.
- 
Method Details- 
getPlayerPlayer getPlayer()Returns the player behind this data.- Returns:
- Bukkit's player
 
- 
getArenaArena getArena()Returns the arena which the player is spectating.- Returns:
- The arena he's spectating
 
- 
getReasonSpectateReason getReason()Returns the reason or the cause of him being a spectator.- Returns:
- The reason he's spectating
 
- 
getEnterTimeInstant getEnterTime()Returns the time when he got a spectator.- Returns:
- The time he started to spectate
 
- 
getReleaseTimeReturns the time when he is supposed to be released from enforced spectating.This is used for death spectating ( getReason()equalsSpectateReason.DEATH).- Returns:
- The time he's supposed to be released. nullif he's not supposed to be released automatically
 
- 
isPresentboolean isPresent()Returns if this Spectator instance is still present.This method will always return false after he stopped being a spectator. - Returns:
- trueif he hasn't stopped being a spectator yet
 
- 
kickdefault boolean kick()Same askick(KickSpectatorReason). Only usesKickSpectatorReason.PLUGINas the reason.- Returns:
- trueif it was successful
 
- 
kickStops the player from spectating any further.Additional things might happen depending on the reason given. - Parameters:
- reason- Reason why he shall get kicked
- Returns:
- trueif it was successful
 
 
-