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 org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerQuitArenaEvent
(Player player, Arena arena, KickReason reason, @Nullable Team team, @Nullable QuitPlayerMemory memory) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
@Nullable QuitPlayerMemory
Returns the memory instance that allows the player to rejoin the match.Returns the reason why he left the arena.@Nullable Team
getTeam()
Returns the team in which he was before he left the arena.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArena
-
Constructor Details
-
PlayerQuitArenaEvent
public PlayerQuitArenaEvent(Player player, Arena arena, KickReason reason, @Nullable @Nullable Team team, @Nullable @Nullable QuitPlayerMemory memory)
-
-
Method Details
-
getReason
Returns the reason why he left the arena.- Returns:
- The reason
-
getTeam
Returns the team in which he was before he left the arena.Might be
null
when 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 instance that allows the player to rejoin the match.It might be
null
in cases where the game's state isn't equal toArenaStatus.RUNNING
or when it doesn't make any sense as for instance when the match is about to end.- Returns:
- The memory of the player. Might be
null
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-