Class PlayerWarpSortEvent

java.lang.Object
org.bukkit.event.Event
com.olziedev.playerwarps.api.events.WarpEvent
com.olziedev.playerwarps.api.events.menu.PlayerWarpSortEvent
All Implemented Interfaces:
Cancellable

public class PlayerWarpSortEvent extends WarpEvent
Event that is triggered before a new sort type is set.
  • Constructor Details

    • PlayerWarpSortEvent

      public PlayerWarpSortEvent(WPlayer player, Comparator<Warp> comparator, WarpSortType sortType)
      This event is triggered before a menu is opened.
      Parameters:
      player - The player that is opening the menu.
      comparator - The type of sorter that is being used.
      sortType - The new sort type.
  • Method Details

    • getHandlerList

      public static HandlerList getHandlerList()
    • getHandlers

      @Nonnull public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getPlayer

      public WPlayer getPlayer()
      Returns:
      The player that is opening the menu.
    • getComparator

      public Comparator<Warp> getComparator()
      Returns:
      The type of sorter that is being used.
    • setComparator

      public void setComparator(Comparator<Warp> comparator)
      Parameters:
      comparator - The new type of sorter that is being used.
    • getWarpSortType

      public WarpSortType getWarpSortType()
      Returns:
      The new sort type.