Class ArenaVotingPoolUpdateEvent

java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.arena.ArenaVotingPoolUpdateEvent
All Implemented Interfaces:
ArenaEvent

public class ArenaVotingPoolUpdateEvent extends Event implements 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.

  • Constructor Details

    • ArenaVotingPoolUpdateEvent

      public ArenaVotingPoolUpdateEvent(Arena arena, int maxPoolSize, List<Arena> potentialPool, List<Arena> pool)
  • Method Details

    • getArena

      public Arena getArena()
      Description copied from interface: ArenaEvent
      Returns the Arena that is involved in this event.
      Specified by:
      getArena in interface ArenaEvent
      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

      public List<Arena> 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 using setPool(List).

      Returns:
      All potential arenas for the voting pool.
    • getPool

      public List<Arena> 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

      public void setPool(List<Arena> pool)
      Set the new voting pool of the arena.
      Parameters:
      pool - The new pool of the arena.
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()