Class AsyncPlayerRejoinPullArenaEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.player.AsyncPlayerRejoinPullArenaEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player from another server attempts to rejoin an arena on this server.
This event gets called before PlayerRejoinArenaEvent.
If this event ends with an issue (or the player fails to get pulled),
PlayerRejoinArenaEvent may not be called at all.
This event may be called even without the ProxySync Add-On installed, as the rejoin mechanism utilizes the BungeeCord messaging system.
This event does not get called if the player is located on the server the arena is located at, or if the arena is located on another server.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionAsyncPlayerRejoinPullArenaEvent(UUID playerUUID, Arena arena, String serverChannelName, 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.static HandlerListGet the issues that prevent the player from rejoining.Get the uniqueId of the player that attempts to rejoin.Get the bungeecord/proxy name of the server the player is located on.booleanGet whether there is any issue that would prevent the player from rejoining.booleanremoveIssue(RejoinPlayerIssue issue) Removes an issue.Methods 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
-
AsyncPlayerRejoinPullArenaEvent
public AsyncPlayerRejoinPullArenaEvent(UUID playerUUID, Arena arena, String serverChannelName, Set<RejoinPlayerIssue> issues)
-
-
Method Details
-
getPlayerUUID
Get the uniqueId of the player that attempts to rejoin.- Returns:
- The
Entity.getUniqueId()of the rejoining player
-
getServerChannelName
Get the bungeecord/proxy name of the server the player is located on.- Returns:
- The server channel name sending the request
-
hasIssues
public boolean hasIssues()Get whether there is any issue that would prevent the player from rejoining.- Returns:
trueif the rejoin would fail- See Also:
-
getIssues
Get the issues that prevent the player from rejoining.- Returns:
- The issues with his attempt
- See Also:
-
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
-