use of com.denizenscript.denizen.objects.MaterialTag in project Denizen-For-Bukkit by DenizenScript.
the class BlockSpreadsScriptEvent method onBlockSpreads.
@EventHandler
public void onBlockSpreads(BlockSpreadEvent event) {
location = new LocationTag(event.getBlock().getLocation());
material = new MaterialTag(event.getSource());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.MaterialTag in project Denizen-For-Bukkit by DenizenScript.
the class EntityInteractScriptEvent method onEntityInteract.
@EventHandler
public void onEntityInteract(EntityInteractEvent event) {
entity = new EntityTag(event.getEntity());
location = new LocationTag(event.getBlock().getLocation());
material = new MaterialTag(event.getBlock());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.MaterialTag in project Denizen-For-Bukkit by DenizenScript.
the class LiquidSpreadScriptEvent method onLiquidSpreads.
@EventHandler
public void onLiquidSpreads(BlockFromToEvent event) {
destination = new LocationTag(event.getToBlock().getLocation());
location = new LocationTag(event.getBlock().getLocation());
material = new MaterialTag(event.getBlock());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.MaterialTag in project Denizen-For-Bukkit by DenizenScript.
the class PistonExtendsScriptEvent method onPistonExtends.
@EventHandler
public void onPistonExtends(BlockPistonExtendEvent event) {
location = new LocationTag(event.getBlock().getLocation());
material = new MaterialTag(event.getBlock());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.MaterialTag 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);
}
Aggregations