Fix item drop issue on older spigot versions
This commit is contained in:
parent
ae3981cebf
commit
18c71453ce
@ -140,6 +140,7 @@ public class BukkitPlayer extends LocalPlayer {
|
||||
public void run(Object value) {
|
||||
for (Map.Entry<Integer, ItemStack> entry : overflow.entrySet()) {
|
||||
ItemStack stack = entry.getValue();
|
||||
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()) {
|
||||
@ -147,6 +148,7 @@ public class BukkitPlayer extends LocalPlayer {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user