diff --git a/src/main/java/rip/tilly/bedwars/listeners/game/WorldListener.java b/src/main/java/rip/tilly/bedwars/listeners/game/WorldListener.java index 04bcf0f..7f55bd3 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/game/WorldListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/game/WorldListener.java @@ -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);