use of com.denizenscript.denizen.objects.LocationTag 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);
}
use of com.denizenscript.denizen.objects.LocationTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerMendsItemScriptEvent method onPlayerItemMend.
@EventHandler
public void onPlayerItemMend(PlayerItemMendEvent event) {
if (EntityTag.isNPC(event.getPlayer())) {
return;
}
item = new ItemTag(event.getItem());
location = new LocationTag(event.getPlayer().getLocation());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.LocationTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerStandsOnScriptEvent method playerStandsOn.
@EventHandler
public void playerStandsOn(PlayerInteractEvent event) {
if (event.getAction() != Action.PHYSICAL) {
return;
}
material = new MaterialTag(event.getClickedBlock());
location = new LocationTag(event.getClickedBlock().getLocation());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.LocationTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerTakesFromLecternScriptEvent method onPlayerTakesFromLectern.
@EventHandler
public void onPlayerTakesFromLectern(PlayerTakeLecternBookEvent event) {
if (EntityTag.isNPC(event.getPlayer())) {
return;
}
item = new ItemTag(event.getBook());
location = new LocationTag(event.getLectern().getLocation());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.LocationTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerWalksOverScriptEvent method onPlayerWalksOver.
@EventHandler
public void onPlayerWalksOver(PlayerMoveEvent event) {
if (LocationTag.isSameBlock(event.getFrom(), event.getTo())) {
return;
}
if (EntityTag.isNPC(event.getPlayer())) {
return;
}
notable = NoteManager.getSavedId(new LocationTag(event.getTo()).getBlockLocation());
if (notable == null) {
return;
}
notable = CoreUtilities.toLowerCase(notable);
this.event = event;
fire(event);
}
Aggregations