13
0
geforkt von Mirrors/Paper

Make setting slots to AIR set them to null. Addresses BUKKIT-1043

Dieser Commit ist enthalten in:
EvilSeph 2012-03-10 15:54:10 -05:00
Ursprung 68c89fcac9
Commit f534863552

Datei anzeigen

@ -69,7 +69,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
public void setItemOnCursor(ItemStack item) {
CraftItemStack stack = new CraftItemStack(item.getType(), item.getAmount(), item.getDurability());
getHandle().inventory.setCarried(stack.getHandle());
getHandle().inventory.setCarried(stack.getType() == Material.AIR ? null : stack.getHandle());
if (this instanceof CraftPlayer) {
((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor
}