Prevent Zombies from picking up shop item

This commit is contained in:
Eric Biedert 2016-06-24 14:53:20 +02:00
parent 08286e6beb
commit 04e63c6225

View File

@ -79,13 +79,14 @@ public class Shop {
itemMeta.setLore(lore);
itemLocation = new Location(location.getWorld(), hologram.getLocation().getX(), location.getY() + 1, hologram.getLocation().getZ());
itemStack = new ItemStack(product.getType(), 1, product.getDurability());
itemStack.setItemMeta(itemMeta);
itemStack = new ItemStack(product);
itemStack.setAmount(1);
item = location.getWorld().dropItem(itemLocation, itemStack);
item.setVelocity(new Vector(0, 0, 0));
item.setMetadata("shopItem", new FixedMetadataValue(plugin, true));
item.setCustomNameVisible(false);
item.setPickupDelay(Integer.MAX_VALUE);
this.item = item;
}