Search in sources :

Example 6 with ItemTag

use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.

the class PlayerElytraBoostScriptEvent method onPlayerElytraBoost.

@EventHandler
public void onPlayerElytraBoost(PlayerElytraBoostEvent event) {
    firework = new ItemTag(event.getItemStack());
    player = new PlayerTag(event.getPlayer());
    this.event = event;
    fire(event);
}
Also used : PlayerTag(com.denizenscript.denizen.objects.PlayerTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 7 with ItemTag

use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.

the class FurnaceBurnsItemScriptEvent method onBrews.

@EventHandler
public void onBrews(FurnaceBurnEvent event) {
    location = new LocationTag(event.getBlock().getLocation());
    item = new ItemTag(event.getFuel());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 8 with ItemTag

use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.

the class BrewingStandFueledScriptEvent method onBrewingStandFueled.

@EventHandler
public void onBrewingStandFueled(BrewingStandFuelEvent event) {
    location = new LocationTag(event.getBlock().getLocation());
    item = new ItemTag(event.getFuel());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 9 with ItemTag

use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.

the class ItemMergesScriptEvent method onItemMerges.

@EventHandler
public void onItemMerges(ItemMergeEvent event) {
    Item entity = event.getEntity();
    Item target = event.getTarget();
    location = new LocationTag(target.getLocation());
    item = new ItemTag(entity.getItemStack());
    this.entity = new EntityTag(entity);
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) Item(org.bukkit.entity.Item) EntityTag(com.denizenscript.denizen.objects.EntityTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 10 with ItemTag

use of com.denizenscript.denizen.objects.ItemTag in project Denizen-For-Bukkit by DenizenScript.

the class ItemRecipeFormedScriptEvent method onRecipeFormed.

@EventHandler
public void onRecipeFormed(PrepareItemCraftEvent event) {
    this.event = event;
    if (event.getRecipe() == null) {
        return;
    }
    result = new ItemTag(event.getInventory().getResult());
    if (result.getBukkitMaterial() == Material.AIR) {
        result = new ItemTag(event.getRecipe().getResult());
    }
    cancelled = false;
    fire(event);
}
Also used : ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Aggregations

ItemTag (com.denizenscript.denizen.objects.ItemTag)77 EventHandler (org.bukkit.event.EventHandler)35 ItemStack (org.bukkit.inventory.ItemStack)20 LocationTag (com.denizenscript.denizen.objects.LocationTag)19 EntityTag (com.denizenscript.denizen.objects.EntityTag)14 ListTag (com.denizenscript.denizencore.objects.core.ListTag)14 ElementTag (com.denizenscript.denizencore.objects.core.ElementTag)13 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)9 Item (org.bukkit.entity.Item)7 Argument (com.denizenscript.denizencore.objects.Argument)6 List (java.util.List)6 InvalidArgumentsException (com.denizenscript.denizencore.exceptions.InvalidArgumentsException)5 ScriptTag (com.denizenscript.denizencore.objects.core.ScriptTag)5 HumanEntity (org.bukkit.entity.HumanEntity)5 Player (org.bukkit.entity.Player)5 InventoryTag (com.denizenscript.denizen.objects.InventoryTag)4 BukkitTagContext (com.denizenscript.denizen.tags.BukkitTagContext)4 DurationTag (com.denizenscript.denizencore.objects.core.DurationTag)4 ArrayList (java.util.ArrayList)4 MaterialTag (com.denizenscript.denizen.objects.MaterialTag)3