Search in sources :

Example 36 with EntityTag

use of com.denizenscript.denizen.objects.EntityTag 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);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) MaterialTag(com.denizenscript.denizen.objects.MaterialTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) ItemTag(com.denizenscript.denizen.objects.ItemTag) EventHandler(org.bukkit.event.EventHandler)

Example 37 with EntityTag

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

the class VehicleCollidesBlockScriptEvent method onVehicleCollidesBlock.

@EventHandler
public void onVehicleCollidesBlock(VehicleBlockCollisionEvent event) {
    vehicle = new EntityTag(event.getVehicle());
    location = new LocationTag(event.getBlock().getLocation());
    material = new MaterialTag(event.getBlock());
    this.event = event;
    fire(event);
}
Also used : LocationTag(com.denizenscript.denizen.objects.LocationTag) MaterialTag(com.denizenscript.denizen.objects.MaterialTag) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 38 with EntityTag

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

the class VehicleCreatedScriptEvent method onVehicleCreated.

@EventHandler
public void onVehicleCreated(VehicleCreateEvent event) {
    Entity entity = event.getVehicle();
    EntityTag.rememberEntity(entity);
    vehicle = new EntityTag(entity);
    this.event = event;
    fire(event);
    EntityTag.forgetEntity(entity);
}
Also used : Entity(org.bukkit.entity.Entity) EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 39 with EntityTag

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

the class PlayerShearsScriptEvent method onPlayerShears.

@EventHandler
public void onPlayerShears(PlayerShearEntityEvent event) {
    if (EntityTag.isNPC(event.getPlayer())) {
        return;
    }
    entity = new EntityTag(event.getEntity());
    this.event = event;
    fire(event);
}
Also used : EntityTag(com.denizenscript.denizen.objects.EntityTag) EventHandler(org.bukkit.event.EventHandler)

Example 40 with EntityTag

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

the class PlayerLeashesEntityScriptEvent method onPlayerLeashes.

@EventHandler
public void onPlayerLeashes(PlayerLeashEntityEvent event) {
    if (EntityTag.isNPC(event.getPlayer())) {
        return;
    }
    holder = PlayerTag.mirrorBukkitPlayer(event.getPlayer());
    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