Class ArenaVotingPoolUpdateEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.ArenaVotingPoolUpdateEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when the voting pool of an arena gets updated.
Note that this event is not called when all players have left an arena, whereby the voting pool gets cleared.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetArena()
Returns theArena
that is involved in this event.static HandlerList
int
Returns the maximum amount of choices you can have when voting.getPool()
Get the new voting pool of the arena.Returns all arenas that are potential choices for the voting pool.void
Set the new voting pool of the arena.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ArenaVotingPoolUpdateEvent
-
-
Method Details
-
getArena
Description copied from interface:ArenaEvent
Returns theArena
that is involved in this event.- Specified by:
getArena
in interfaceArenaEvent
- Returns:
- The arena that is involved
-
getMaxPoolSize
public int getMaxPoolSize()Returns the maximum amount of choices you can have when voting.- Returns:
- The maximum amount of choices you can have when voting.
-
getPotentialPool
Returns all arenas that are potential choices for the voting pool.Unlike
getPool()
, this one hasn't already been reduced to the maximum amount of choices you can have when voting. Arenas, that may not be voted for, as e.g. they're already in another pool, not joinable or whatever critera there might be already have been filtered. Work with this list and reduce it however you like if you want to implement your custom pool usingsetPool(List)
.- Returns:
- All potential arenas for the voting pool.
-
getPool
Get the new voting pool of the arena.It is safe to modify the returned collection. Do note that it restricted to max amount of choices you can have when voting. Use
getPotentialPool()
if you want to set your custom pool.- Returns:
- The new pool of the arena.
-
setPool
Set the new voting pool of the arena.- Parameters:
pool
- The new pool of the arena.
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-