onchangeblock

This commit is contained in:
MidnightTale 2023-04-12 15:00:47 +07:00
commit 0f61c06f8c

View file

@ -57,7 +57,7 @@ public class Bbsdfia extends JavaPlugin implements Listener {
} }
@EventHandler @EventHandler
public void onEntitySpawn(EntitySpawnEvent event) { public void onEntityChangeBlock(EntityChangeBlockEvent event) {
Entity entity = event.getEntity(); Entity entity = event.getEntity();
if (entity instanceof FallingBlock && entity.getWorld().getEnvironment() == World.Environment.THE_END) { if (entity instanceof FallingBlock && entity.getWorld().getEnvironment() == World.Environment.THE_END) {
// Spawn a new falling block entity with velocity to the north and upward // Spawn a new falling block entity with velocity to the north and upward