Permalink
Browse files

Fix modifying item in item_pickup

  • Loading branch information...
PseudoKnight committed Sep 28, 2018
1 parent 2c9f48a commit 52c69d40669e839b1fa43a156b0b5d9bfa5ba0d2
@@ -535,7 +535,7 @@ public void setItemStack(MCItemStack stack) {
ItemStack is = (ItemStack) stack.getHandle();
e.setCancelled(true);
e.getItem().remove();
if(is != null && is.getType().equals(Material.AIR)) {
if(is != null && !is.getType().equals(Material.AIR)) {
((Player) e.getEntity()).getInventory().addItem(is);
//and for added realism :)
e.getEntity().getWorld().playSound(e.getItem().getLocation(),

0 comments on commit 52c69d4

Please sign in to comment.