diff --git a/bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java b/bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java index 5e959f13..8a192ed1 100644 --- a/bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java +++ b/bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java @@ -140,10 +140,12 @@ public class BukkitPlayer extends LocalPlayer { public void run(Object value) { for (Map.Entry entry : overflow.entrySet()) { ItemStack stack = entry.getValue(); - Item dropped = player.getWorld().dropItem(player.getLocation(), stack); - PlayerDropItemEvent event = new PlayerDropItemEvent(player, dropped); - if (event.isCancelled()) { - dropped.remove(); + if (stack.getType() != Material.AIR && stack.getAmount() > 0) { + Item dropped = player.getWorld().dropItem(player.getLocation(), stack); + PlayerDropItemEvent event = new PlayerDropItemEvent(player, dropped); + if (event.isCancelled()) { + dropped.remove(); + } } } }