Class AbilityItem

java.lang.Object
cc.synkdev.items.AbilityItem

public class AbilityItem extends Object
The class representing Items you give abilities to
  • Constructor Details

    • AbilityItem

      public AbilityItem(String id)
      Initialize the item
      Parameters:
      id - The ID you want to give to the item
  • Method Details

    • newItem

      public static AbilityItem newItem(String id)
    • from

      public AbilityItem from(org.bukkit.inventory.ItemStack item)
      Set what itemStack will be represented by the AbilityItem
      Parameters:
      item - The ItemStack
      Returns:
    • lockInSlot

      public AbilityItem lockInSlot()
      Stops the item from being moved from the slot it was in originally (except with openInv, death or /clear
      Returns:
    • denyDrop

      public AbilityItem denyDrop()
      Stops the item from being dropped to the ground
      Returns:
    • setClickEvent

      public AbilityItem setClickEvent(ClickActions<org.bukkit.event.player.PlayerInteractEvent> event)
      Sets what happens when the item is clicked
      Parameters:
      event - An example event for you to work on
      Returns:
    • setQuantity

      public AbilityItem setQuantity(int quantity)
      Set the stack size of the item
      Parameters:
      quantity - Stack size
      Returns:
    • setPermission

      public AbilityItem setPermission(String permission)
      Sets the permission required to use the item.
      Parameters:
      permission -
      Returns:
    • build

      public AbilityItem build()
      Submit the item to the plugin
      Returns:
    • give

      public void give(org.bukkit.entity.Player p)
      Give the item to a player
      Parameters:
      p - The player