Class ItemEvent

java.lang.Object
dev.selena.luacore.utils.items.ItemEvent
All Implemented Interfaces:
org.bukkit.event.Listener

public class ItemEvent extends Object implements org.bukkit.event.Listener
Used for managing items, This should only be used in one plugin on your server.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    blockPlace(org.bukkit.event.block.BlockPlaceEvent event)
    Used to stop players from placing blocks with the unusable tag
    void
    itemSpawn(org.bukkit.event.entity.ItemSpawnEvent event)
    used for handling unstackable items
    void
    itemUse(org.bukkit.event.player.PlayerInteractEvent event)
    event to stop users from consuming items with the unusable tag

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ItemEvent

      public ItemEvent()
  • Method Details

    • itemUse

      public void itemUse(org.bukkit.event.player.PlayerInteractEvent event)
      event to stop users from consuming items with the unusable tag
      Parameters:
      event - PlayerInteractEvent to intercept the player using the item
    • blockPlace

      public void blockPlace(org.bukkit.event.block.BlockPlaceEvent event)
      Used to stop players from placing blocks with the unusable tag
      Parameters:
      event - BlockPlaceEvent to intercept the player placing the block
    • itemSpawn

      public void itemSpawn(org.bukkit.event.entity.ItemSpawnEvent event)
      used for handling unstackable items
      Parameters:
      event - ItemSpawnEvent so any creation of Item entities with the "UNSTACKABLE" NBT tag will work