Class PlayerRejoinArenaEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerRejoinArenaEvent
- All Implemented Interfaces:
ArenaEvent
Player attempts to get added back to an arena after having quit it in the past.
Commonly, this is used when a player attempts to rejoin a running game.
There is a special case however, and that is specators getting added into an already ended game, see RejoinPlayerCause.END_LOBBY.
-
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
ConstructorsConstructorDescriptionPlayerRejoinArenaEvent(Player player, Arena arena, RejoinPlayerCause cause, @Nullable QuitPlayerMemory memory, Set<RejoinPlayerIssue> issues) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIssue(RejoinPlayerIssue issue) Adds an issue which causes the player to not be able to rejoin the arena.getCause()Returns the cause why the player is rejoining the arena.static HandlerListReturns all issues there are for the player to rejoin the arena.@Nullable QuitPlayerMemoryReturns the memory of the player that contains all info needed to successfully make him rejoin the arena.booleanReturns if the player has any issues rejoining the arena.booleanremoveIssue(RejoinPlayerIssue issue) Removes an issue.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.marcely.bedwars.api.event.arena.ArenaEvent
getArena
-
Constructor Details
-
PlayerRejoinArenaEvent
public PlayerRejoinArenaEvent(Player player, Arena arena, RejoinPlayerCause cause, @Nullable @Nullable QuitPlayerMemory memory, Set<RejoinPlayerIssue> issues)
-
-
Method Details
-
getCause
Returns the cause why the player is rejoining the arena.- Returns:
- The cause
-
getMemory
Returns the memory of the player that contains all info needed to successfully make him rejoin the arena.It's possible that it's
nullas no memory was found for the player.- Returns:
- The memory of the player. Possibly
null
-
hasIssues
public boolean hasIssues()Returns if the player has any issues rejoining the arena.- Returns:
- If there are issues which cause the player not being able to rejoin the arena
-
getIssues
Returns all issues there are for the player to rejoin the arena.- Returns:
- The issues why the player can't rejoin the arena
-
addIssue
Adds an issue which causes the player to not be able to rejoin the arena.- Parameters:
issue- The issue that shall be added- Returns:
falseif that issue already existed before
-
removeIssue
Removes an issue. If all were removed the player will be able to rejoin the arena.- Parameters:
issue- The issue that shall be removed- Returns:
trueif it has been removed
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-