use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.
the class InventoryPicksUpItemScriptEvent method onInvPicksUpItem.
@EventHandler
public void onInvPicksUpItem(InventoryPickupItemEvent event) {
this.event = event;
inventory = InventoryTag.mirrorBukkitInventory(event.getInventory());
item = new ItemTag(event.getItem().getItemStack());
fire(event);
}
use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.
the class ItemMoveScriptEvent method onInventoryMoveItemEvent.
@EventHandler
public void onInventoryMoveItemEvent(InventoryMoveItemEvent event) {
this.event = event;
origin = InventoryTag.mirrorBukkitInventory(event.getSource());
destination = InventoryTag.mirrorBukkitInventory(event.getDestination());
item = new ItemTag(event.getItem());
fire(event);
}
use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerEmptiesBucketScriptEvent method onBucketEmpty.
@EventHandler
public void onBucketEmpty(PlayerBucketEmptyEvent event) {
location = new LocationTag(event.getBlockClicked().getLocation());
item = new ItemTag(event.getBucket());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerFillsBucketScriptEvent method onBucketFill.
@EventHandler
public void onBucketFill(PlayerBucketFillEvent event) {
entity = new EntityTag(event.getPlayer());
location = new LocationTag(event.getBlockClicked().getLocation());
item = new ItemTag(event.getItemStack());
material = new MaterialTag(event.getBlockClicked());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayersPrepareSmithingTableScriptEvent method onCraftItem.
@EventHandler
public void onCraftItem(PrepareSmithingEvent event) {
if (event.getInventory().getViewers().isEmpty()) {
return;
}
HumanEntity humanEntity = event.getInventory().getViewers().get(0);
if (EntityTag.isNPC(humanEntity)) {
return;
}
this.event = event;
result = new ItemTag(event.getResult());
this.player = EntityTag.getPlayerFrom(humanEntity);
this.cancelled = false;
fire(event);
}
Aggregations