mirror of
https://github.com/kaboomserver/extras.git
synced 2025-07-22 21:43:48 +00:00
fix: don't try changing the blockstate of spawner minecarts
This commit is contained in:
parent
742674cddd
commit
0eb0fe2c6e
1 changed files with 4 additions and 2 deletions
|
@ -231,8 +231,10 @@ public final class EntitySpawn implements Listener {
|
|||
if (EntityType.FALLING_BLOCK.equals(event.getEntityType())) {
|
||||
final FallingBlock block = (FallingBlock) event.getEntity();
|
||||
|
||||
if (block.getBlockData().getMaterial().equals(Material.SPAWNER)) {
|
||||
event.setCancelled(true);
|
||||
if (!block.getBlockData().getMaterial().equals(Material.SPAWNER)) return;
|
||||
event.setCancelled(true);
|
||||
|
||||
if (event.getSpawner() != null) {
|
||||
event.getSpawner().setSpawnedType(EntityType.FALLING_BLOCK);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue