use of com.denizenscript.denizen.objects.MaterialTag in project Denizen-For-Bukkit by DenizenScript.
the class DenizenPacketListenerImpl method handleSignUpdate.
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
if (fakeSignExpected != null && packet.getPos().equals(fakeSignExpected)) {
fakeSignExpected = null;
PlayerChangesSignScriptEvent evt = (PlayerChangesSignScriptEvent) PlayerChangesSignScriptEvent.instance.clone();
evt.cancelled = false;
evt.material = new MaterialTag(org.bukkit.Material.OAK_WALL_SIGN);
evt.location = new LocationTag(player.getBukkitEntity().getLocation());
LocationTag loc = evt.location.clone();
loc.setY(0);
evt.event = new SignChangeEvent(loc.getBlock(), player.getBukkitEntity(), packet.getLines());
evt.fire(evt.event);
}
super.handleSignUpdate(packet);
}
Aggregations