geforkt von Mirrors/Paper
Make setting slots to AIR set them to null. Addresses BUKKIT-1043
Dieser Commit ist enthalten in:
Ursprung
68c89fcac9
Commit
f534863552
@ -69,7 +69,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
|
|
||||||
public void setItemOnCursor(ItemStack item) {
|
public void setItemOnCursor(ItemStack item) {
|
||||||
CraftItemStack stack = new CraftItemStack(item.getType(), item.getAmount(), item.getDurability());
|
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) {
|
if (this instanceof CraftPlayer) {
|
||||||
((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor
|
((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren