This commit is contained in:
Trixkz 2021-11-22 13:29:15 -05:00
parent 3f9dbf4463
commit 14f7e33493

View File

@ -76,6 +76,7 @@ public class WorldListener implements Listener {
playerData.setGameBedsDestroyed(playerData.getGameBedsDestroyed() + 1);
playerData.setBedsDestroyed(playerData.getBedsDestroyed() + 1);
block.getDrops().clear();
block.getDrops().removeIf(Objects::nonNull);
Location location = block.getLocation();
@ -91,12 +92,6 @@ public class WorldListener implements Listener {
return;
}
if (block.getType() == Material.BED) {
block.getDrops().clear();
return;
}
player.getInventory().addItem(block.getDrops().toArray(new ItemStack[0]));
game.removePlacedBlock(block);
block.setType(Material.AIR);