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
ConstructorDescriptionPlayerJoinArenaEvent
(Player player, Arena arena, AddPlayerCause cause, Team team, Set<AddPlayerIssue> issues) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addIssue
(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 HandlerList
Returns all issues there are for the player to enter the arena.@Nullable Team
getTeam()
Returns the team to which the player is automatically getting added to.boolean
Returns if the player has any issues entering the arena.boolean
removeIssue
(AddPlayerIssue issue) Removes an issue.void
Set the team to which the player shall automatically get added to.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
-
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 benull
when 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 benull
when 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:
false
if 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:
true
if it has been removed
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-