Search in sources :

Example 11 with EntityTag

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

the class EntityCreatePortalScriptEvent method onEntityCreatesPortal.

@EventHandler
public void onEntityCreatesPortal(EntityCreatePortalEvent event) {
    entity = new EntityTag(event.getEntity());
    this.event = event;
    fire(event);
}
Also used : EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 12 with EntityTag

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

the class EntityDropsItemScriptEvent method onPlayerDropsItem.

@EventHandler
public void onPlayerDropsItem(PlayerDropItemEvent event) {
    dropper = new EntityTag(event.getPlayer());
    location = dropper.getLocation();
    itemEntity = new EntityTag(event.getItemDrop());
    EntityTag.rememberEntity(itemEntity.getBukkitEntity());
    item = new ItemTag(((Item) itemEntity.getBukkitEntity()).getItemStack());
    fire(event);
}
Also used : Item(org.bukkit.entity.Item) EntityTag(com.denizenscript.denizen.objects.EntityTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 13 with EntityTag

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

the class EntityDropsItemScriptEvent method onEntityDropsItem.

@EventHandler
public void onEntityDropsItem(EntityDropItemEvent event) {
    dropper = new EntityTag(event.getEntity());
    location = dropper.getLocation();
    itemEntity = new EntityTag(event.getItemDrop());
    EntityTag.rememberEntity(itemEntity.getBukkitEntity());
    item = new ItemTag(((Item) itemEntity.getBukkitEntity()).getItemStack());
    fire(event);
}
Also used : Item(org.bukkit.entity.Item) EntityTag(com.denizenscript.denizen.objects.EntityTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 14 with EntityTag

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

the class EntityEntersVehicleScriptEvent method onEntityEntersVehicle.

@EventHandler
public void onEntityEntersVehicle(EntityMountEvent event) {
    vehicle = new EntityTag(event.getMount());
    entity = new EntityTag(event.getEntity());
    this.event = event;
    fire(event);
}
Also used : EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 15 with EntityTag

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

the class EntityExplosionPrimesScriptEvent method onEntityExplosionPrimes.

@EventHandler
public void onEntityExplosionPrimes(ExplosionPrimeEvent event) {
    entity = new EntityTag(event.getEntity());
    this.event = event;
    fire(event);
}
Also used : EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Aggregations

EntityTag (com.denizenscript.denizen.objects.EntityTag)142 EventHandler (org.bukkit.event.EventHandler)81 ElementTag (com.denizenscript.denizencore.objects.core.ElementTag)56 LocationTag (com.denizenscript.denizen.objects.LocationTag)45 List (java.util.List)27 Entity (org.bukkit.entity.Entity)25 ItemTag (com.denizenscript.denizen.objects.ItemTag)17 ListTag (com.denizenscript.denizencore.objects.core.ListTag)17 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)15 InvalidArgumentsException (com.denizenscript.denizencore.exceptions.InvalidArgumentsException)12 DurationTag (com.denizenscript.denizencore.objects.core.DurationTag)11 NPCTag (com.denizenscript.denizen.objects.NPCTag)10 ArrayList (java.util.ArrayList)10 BukkitRunnable (org.bukkit.scheduler.BukkitRunnable)10 ScriptEntry (com.denizenscript.denizencore.scripts.ScriptEntry)9 Player (org.bukkit.entity.Player)9 MaterialTag (com.denizenscript.denizen.objects.MaterialTag)8 Argument (com.denizenscript.denizencore.objects.Argument)8 LivingEntity (org.bukkit.entity.LivingEntity)8 Item (org.bukkit.entity.Item)7