Package cc.synkdev.items
Class AbilityItem
java.lang.Object
cc.synkdev.items.AbilityItem
The class representing Items you give abilities to
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Submit the item to the plugindenyDrop()
Stops the item from being dropped to the groundfrom
(org.bukkit.inventory.ItemStack item) Set what itemStack will be represented by the AbilityItemvoid
give
(org.bukkit.entity.Player p) Give the item to a playerStops the item from being moved from the slot it was in originally (except with openInv, death or /clearstatic AbilityItem
setClickEvent
(ClickActions<org.bukkit.event.player.PlayerInteractEvent> event) Sets what happens when the item is clickedsetPermission
(String permission) Sets the permission required to use the item.setQuantity
(int quantity) Set the stack size of the item
-
Constructor Details
-
AbilityItem
Initialize the item- Parameters:
id
- The ID you want to give to the item
-
-
Method Details
-
newItem
-
from
Set what itemStack will be represented by the AbilityItem- Parameters:
item
- The ItemStack- Returns:
-
lockInSlot
Stops the item from being moved from the slot it was in originally (except with openInv, death or /clear- Returns:
-
denyDrop
Stops the item from being dropped to the ground- Returns:
-
setClickEvent
Sets what happens when the item is clicked- Parameters:
event
- An example event for you to work on- Returns:
-
setQuantity
Set the stack size of the item- Parameters:
quantity
- Stack size- Returns:
-
setPermission
Sets the permission required to use the item.- Parameters:
permission
-- Returns:
-
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
-