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
-
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
ConstructorDescriptionPlayerRejoinArenaEvent
(Player player, Arena arena, @Nullable QuitPlayerMemory memory, Set<RejoinPlayerIssue> issues) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addIssue
(RejoinPlayerIssue issue) Adds an issue which causes the player to not be able to rejoin the arena.static HandlerList
Returns all issues there are for the player to rejoin the arena.@Nullable QuitPlayerMemory
Returns the memory of the player that contains all info needed to successfully make him rejoin the arena.boolean
Returns if the player has any issues rejoining the arena.boolean
removeIssue
(RejoinPlayerIssue issue) Removes an issue.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
-
PlayerRejoinArenaEvent
public PlayerRejoinArenaEvent(Player player, Arena arena, @Nullable @Nullable QuitPlayerMemory memory, Set<RejoinPlayerIssue> issues)
-
-
Method Details
-
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
null
as 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:
false
if 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:
true
if it has been removed
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-