Interface Spectator
public interface Spectator
Represents a spectating player and contains the info about him
-
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Returns the arena which the player is spectating.long
Returns the time in milliseconds when he got a spectator.Returns the player behind this data.Returns the reason or the cause of him being a spectator.boolean
Returns if this Spectator instance is still present.default boolean
kick()
Same askick(KickSpectatorReason)
.boolean
kick
(KickSpectatorReason reason) Stops the player from spectating any further.
-
Method Details
-
getPlayer
Player getPlayer()Returns the player behind this data.- Returns:
- Bukkit's player
-
getArena
Arena getArena()Returns the arena which the player is spectating.- Returns:
- The arena he's spectating
-
getReason
SpectateReason getReason()Returns the reason or the cause of him being a spectator.- Returns:
- The reason he's spectating
-
getEnterTime
long getEnterTime()Returns the time in milliseconds when he got a spectator.- Returns:
- The time he started to spectate
-
isPresent
boolean isPresent()Returns if this Spectator instance is still present.This method will always return false after he stopped being a spectator.
- Returns:
true
if he hasn't stopped being a spectator yet
-
kick
default boolean kick()Same askick(KickSpectatorReason)
. Only usesKickSpectatorReason.PLUGIN
as the reason.- Returns:
true
if it was successful
-
kick
Stops the player from spectating any further.Additional things might happen depending on the reason given.
- Parameters:
reason
- Reason why he shall get kicked- Returns:
true
if it was successful
-