Class PlayerJoinArenaEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerJoinArenaEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when a player joins 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
ConstructorsConstructorDescriptionPlayerJoinArenaEvent(Player player, Arena arena, AddPlayerCause cause, Team team, Set<AddPlayerIssue> issues) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddIssue(AddPlayerIssue issue) Adds an issue which causes the player to not be able to enter the arena.getCause()Returns what has made the player to join the arena.static HandlerListReturns all issues there are for the player to enter the arena.@Nullable TeamgetTeam()Returns the team to which the player is automatically getting added to.booleanReturns if the player has any issues entering the arena.booleanremoveIssue(AddPlayerIssue issue) Removes an issue.voidSet the team to which the player shall automatically get added to.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
-
PlayerJoinArenaEvent
public PlayerJoinArenaEvent(Player player, Arena arena, AddPlayerCause cause, Team team, Set<AddPlayerIssue> issues)
-
-
Method Details
-
getCause
Returns what has made the player to join the arena.- Returns:
- The cause of the player entering the arena
-
getTeam
Returns the team to which the player is automatically getting added to. Can benullwhen the player isn't in any team.- Returns:
- The team of the player, might be
null
-
setTeam
Set the team to which the player shall automatically get added to. Can benullwhen he shouldn't be added to one.- Parameters:
team- His new team
-
hasIssues
public boolean hasIssues()Returns if the player has any issues entering the arena.- Returns:
- If there are issues which cause the player not being able to enter the arena
-
getIssues
Returns all issues there are for the player to enter the arena.- Returns:
- The issues why the player can't enter the arena
-
addIssue
Adds an issue which causes the player to not be able to enter 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 enter the arena.- Parameters:
issue- The issue that shall be removed- Returns:
trueif it has been removed
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-