Class TownyItemuseEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TownyItemuseEvent extends TownyActionEvent
Part of the API which lets Towny's war and other plugins modify Towny's plot-permission-decision outcomes. Itemuse event thrown when a player attempts to use an item that is in the Towny config's item_use_ids list. These are typically consumed items like enderpearls, chorus fruit, boats and minecarts items, etc.
Author:
LlmDl
  • Constructor Details

    • TownyItemuseEvent

      public TownyItemuseEvent(org.bukkit.entity.Player player, org.bukkit.Location loc, org.bukkit.Material mat, TownBlock townblock, boolean cancelled)
      Itemuse event thrown when a player attempts to use an item that is in the Towny config's item_use_ids list. These are typically consumed items like enderpearls, chorus fruit, boats and minecarts items, etc. This will be thrown even if Towny has already decided to cancel the event, giving other plugins (and Towny's internal war system) the chance to modify the outcome. If you do not intend to un-cancel something already cancelled by Towny, use ignorecancelled=true in order to get only events which Towny will otherwise allow.
      Parameters:
      player - involved in the itemuse event.
      loc - location of the block which has an item being used on it.
      mat - material of the item being used.
      townblock - - TownBlock or null if in the wilderness.
      cancelled - true if Towny has already determined this will be cancelled.
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event