Class ArenaIssuesCheckEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.ArenaIssuesCheckEvent
- All Implemented Interfaces:
ArenaEvent
- Direct Known Subclasses:
ArenaEnableEvent
Gets called when the plugin is checking whether or not an arena has issues.
This can occur for any reason, but usually happens with ArenaEnableEvent
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Things preventing the arena from getting enabledstatic enum
Represents the type of an issue.Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionArenaIssuesCheckEvent
(Arena arena, Set<ArenaIssuesCheckEvent.Issue> issues, @Nullable CommandSenderWrapper sender) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an issue which prevents the arena from being enabledstatic HandlerList
Returns every issue that prevents the arena from being enabled@Nullable CommandSender
Returns the person who initiated the check.@Nullable CommandSenderWrapper
Returns the person who initiated the check.boolean
Returns if the arena has any issues and by that won't be able to start correctlyboolean
Remove a specific issue from this eventvoid
Removes every issue and causes the arena to be enabled anywaysMethods 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
-
ArenaIssuesCheckEvent
public ArenaIssuesCheckEvent(Arena arena, Set<ArenaIssuesCheckEvent.Issue> issues, @Nullable @Nullable CommandSenderWrapper sender)
-
-
Method Details
-
hasIssues
public boolean hasIssues()Returns if the arena has any issues and by that won't be able to start correctly- Returns:
true
if it has one or more issues
-
getIssues
Returns every issue that prevents the arena from being enabled- Returns:
- Every issue that the arena has
-
addIssue
Add an issue which prevents the arena from being enabled- Parameters:
issue
- The issue that the arena has
-
removeIssue
Remove a specific issue from this event- Parameters:
issue
- The issue that should be removed- Returns:
- returns true if the issue was successfully removed
-
removeIssues
public void removeIssues()Removes every issue and causes the arena to be enabled anyways -
getSender
Returns the person who initiated the check. May returnnull
when a system initiated that (or e.g. someone remotely)- Returns:
- The person who tried to enable the arena
-
getSenderWrapped
Returns the person who initiated the check. May returnnull
when a system initiated that- Returns:
- The person who tried to enable the arena
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-