mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-29 12:37:53 +01:00
Fix item drop issue on older spigot versions
This commit is contained in:
parent
ae3981cebf
commit
18c71453ce
@ -140,10 +140,12 @@ public class BukkitPlayer extends LocalPlayer {
|
||||
public void run(Object value) {
|
||||
for (Map.Entry<Integer, ItemStack> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user