mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-01 07:03:52 +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) {
|
public void run(Object value) {
|
||||||
for (Map.Entry<Integer, ItemStack> entry : overflow.entrySet()) {
|
for (Map.Entry<Integer, ItemStack> entry : overflow.entrySet()) {
|
||||||
ItemStack stack = entry.getValue();
|
ItemStack stack = entry.getValue();
|
||||||
Item dropped = player.getWorld().dropItem(player.getLocation(), stack);
|
if (stack.getType() != Material.AIR && stack.getAmount() > 0) {
|
||||||
PlayerDropItemEvent event = new PlayerDropItemEvent(player, dropped);
|
Item dropped = player.getWorld().dropItem(player.getLocation(), stack);
|
||||||
if (event.isCancelled()) {
|
PlayerDropItemEvent event = new PlayerDropItemEvent(player, dropped);
|
||||||
dropped.remove();
|
if (event.isCancelled()) {
|
||||||
|
dropped.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user