mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Make setting slots to AIR set them to null. Addresses BUKKIT-1043
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
bdca84f357
commit
a9a9110af2
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue