mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
Make setting slots to AIR set them to null. Addresses BUKKIT-1043
This commit is contained in:
parent
68c89fcac9
commit
f534863552
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user