-
Notifications
You must be signed in to change notification settings - Fork 0
Custom Events
Alexander Chapchuk edited this page Jul 5, 2021
·
3 revisions
CustomItems support few custom Event for getting your CustomItemStack's at Runtime.
Called when
Entity
pickup theCustomItemStack
@EventHandler
public void onPickup(EntityPickupCustomItemEvent event) {
AbstractCustomItemStack abstractItemStack = event.getItem().getItemStack();
//TODO process
}
Called when
Player
dropCustomItemStack
@EventHandler
public void onPickup(PlayerDropCustomItemEvent event) {
AbstractCustomItemStack abstractItemStack = event.getItemDrop().getItemStack();
//TODO process
}
Called when
Player
click atCustomItemStack
in the inventory
@EventHandler
public void onPickup(PlayerClickOnCustomItemStackInInventoryEvent event) {
AbstractCustomItemStack abstractItemStack = event.getCurrentItem();
//TODO process
}
Called when
Player
damage someEntity
with theCustomItemStack
@EventHandler
public void onPickup(EntityDamageByPlayerWithCustomItemStackEvent event) {
AbstractCustomItemStack abstractItemStack = event.getAbstractCustomItemStack();
//TODO process
}
Called when
Player
interact something (AIR/BLOCK) with theCustomItemStack
@EventHandler
public void onPickup(PlayerInteractWithCustomItemStackEvent event) {
AbstractCustomItemStack abstractItemStack = event.getItem();
//TODO process
}
Just request that in issues