Class PlayerBanItemEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
fr.andross.banitem.events.PlayerBanItemEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public final class PlayerBanItemEvent extends org.bukkit.event.player.PlayerEvent implements org.bukkit.event.Cancellable
Called when an item should be banned This is only for check purpose, no modifications can be made. Cancelling the event will cancel the ban process.
Version:
3.3
Author:
Andross
  • Constructor Details

  • Method Details

    • getType

      public PlayerBanItemEvent.Type getType()
      Type of banning
      Returns:
      the type of ban, BLACKLIST or WHITELIST
    • getBannedItem

      @NotNull public BannedItem getBannedItem()
      The banned item
      Returns:
      the banned item involved into this event
    • getAction

      @NotNull public BanAction getAction()
      The ban action
      Returns:
      the action triggered
    • getActionData

      @NotNull public BanActionData getActionData()
      The ban action data
      Returns:
      the ban action data that the banned item has in database
    • getaction

      @Deprecated @NotNull public BanAction getaction()
      Deprecated.
      Error in typo. Use getAction() instead.
      The ban action
      Returns:
      the action triggered
    • getactionData

      @Deprecated @NotNull public BanActionData getactionData()
      Deprecated.
      Error in typo. Use getActionData() instead.
      The ban action data
      Returns:
      the ban action data that the banned item has in database
    • getData

      @Nullable public BanData[] getData()
      The data used
      Returns:
      all the ban datas used into this event
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NotNull public static org.bukkit.event.HandlerList getHandlerList()