Class PlayerQuitArenaEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerQuitArenaEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player leaves an arena
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerQuitArenaEvent(Player player, Arena arena, KickReason reason, @Nullable Team team, @Nullable QuitPlayerMemory memory, boolean hasLeaveMessage) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList@Nullable QuitPlayerMemoryReturns the memory of his past ingame state.Returns the reason why he left the arena.@Nullable TeamgetTeam()Returns the team in which he was before he left the arena.booleanReturns whether a leave message should be sent for all players in the arena.voidsetHasLeaveMessage(boolean hasLeaveMessage) Sets whether a leave message should be sent for all players in the arena.Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
getEventName, isAsynchronousMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArenaEvent
getArena
-
Constructor Details
-
PlayerQuitArenaEvent
public PlayerQuitArenaEvent(Player player, Arena arena, KickReason reason, @Nullable @Nullable Team team, @Nullable @Nullable QuitPlayerMemory memory, boolean hasLeaveMessage)
-
-
Method Details
-
hasLeaveMessage
public boolean hasLeaveMessage()Returns whether a leave message should be sent for all players in the arena.- Returns:
trueif a leave message should be sent,falseotherwise
-
setHasLeaveMessage
public void setHasLeaveMessage(boolean hasLeaveMessage) Sets whether a leave message should be sent for all players in the arena.- Parameters:
hasLeaveMessage-trueif a leave message should be sent,falseotherwise
-
getReason
-
getTeam
Returns the team in which he was before he left the arena.Might be
nullwhen they didn't join any as it's possible during the lobby phase.- Returns:
- The arena in which he played in
-
getMemory
Returns the memory of his past ingame state.It might be
nullif the match hasn't started yet or it has already ended past the endlobby state.- Returns:
- The memory of the player. Might be
null
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-