use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityTransformScriptEvent method onEntityTransform.
@EventHandler
public void onEntityTransform(EntityTransformEvent event) {
this.event = event;
originalEntity = new EntityTag(event.getEntity());
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class PigZappedScriptEvent method onPigZapped.
@EventHandler
public void onPigZapped(PigZapEvent event) {
pig = new EntityTag(event.getEntity());
Entity pigZombie = event.getPigZombie();
EntityTag.rememberEntity(pigZombie);
pig_zombie = new EntityTag(pigZombie);
lightning = new EntityTag(event.getLightning());
this.event = event;
fire(event);
EntityTag.forgetEntity(pigZombie);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class ProjectileHitsBlockScriptEvent method onProjectileHits.
@EventHandler
public void onProjectileHits(ProjectileHitEvent event) {
projectile = new EntityTag(event.getEntity());
if (projectile.getLocation() == null) {
// No, I can't explain how or why this would ever happen... nonetheless, it appears it does happen sometimes.
return;
}
if (Double.isNaN(projectile.getLocation().getDirection().normalize().getX())) {
// I can't explain this one either. It also chooses to happen whenever it pleases.
return;
}
Block block = event.getHitBlock();
if (block == null) {
return;
}
material = new MaterialTag(block);
shooter = projectile.getShooter();
location = new LocationTag(block.getLocation());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class ProjectileLaunchedScriptEvent method onProjectileLaunched.
@EventHandler
public void onProjectileLaunched(ProjectileLaunchEvent event) {
Entity projectile = event.getEntity();
EntityTag.rememberEntity(projectile);
this.projectile = new EntityTag(projectile);
location = new LocationTag(event.getEntity().getLocation());
this.event = event;
fire(event);
EntityTag.forgetEntity(projectile);
}
use of com.denizenscript.denizen.objects.EntityTag in project Denizen-For-Bukkit by DenizenScript.
the class SheepRegrowsScriptEvent method onSheepRegrows.
@EventHandler
public void onSheepRegrows(SheepRegrowWoolEvent event) {
entity = new EntityTag(event.getEntity());
location = new LocationTag(entity.getLocation());
this.event = event;
fire(event);
}
Aggregations