use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityAirLevelChangeScriptEvent method onEntityAirLevelChanged.
@EventHandler
public void onEntityAirLevelChanged(EntityAirChangeEvent event) {
entity = new EntityTag(event.getEntity());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityBreaksHangingScriptEvent method onHangingBreaks.
@EventHandler
public void onHangingBreaks(HangingBreakByEntityEvent event) {
hanging = new EntityTag(event.getEntity());
cause = new ElementTag(event.getCause().name());
location = new LocationTag(hanging.getLocation());
breaker = new EntityTag(event.getRemover());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityDamagedScriptEvent method onEntityDamaged.
@EventHandler
public void onEntityDamaged(EntityDamageEvent event) {
entity = new EntityTag(event.getEntity());
cause = new ElementTag(CoreUtilities.toLowerCase(event.getCause().name()));
damager = null;
projectile = null;
held = null;
if (event instanceof EntityDamageByEntityEvent) {
damager = new EntityTag(((EntityDamageByEntityEvent) event).getDamager());
if (damager.isProjectile()) {
projectile = damager;
if (damager.hasShooter()) {
damager = damager.getShooter();
}
}
if (damager != null) {
held = damager.getItemInHand();
if (held != null) {
held.setAmount(1);
}
}
}
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityFoodLevelChangeScriptEvent method onEntityFoodLevelChanged.
@EventHandler
public void onEntityFoodLevelChanged(FoodLevelChangeEvent event) {
entity = new EntityTag(event.getEntity());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntitySpawnerSpawnScriptEvent method onSpawnerSpawn.
@EventHandler
public void onSpawnerSpawn(SpawnerSpawnEvent event) {
Entity entity = event.getEntity();
this.entity = new EntityTag(entity);
location = new LocationTag(event.getLocation());
spawnerLocation = new LocationTag(event.getSpawner().getLocation());
this.event = event;
EntityTag.rememberEntity(entity);
fire(event);
EntityTag.forgetEntity(entity);
}
Aggregations