Fix a NullPointerException.
This commit is contained in:
parent
f15785669a
commit
d8199aaa39
@ -119,12 +119,14 @@ public abstract class Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (j == 1) {
|
if (j == 1) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start - Store a reference
|
||||||
if (playerinventory.getCarried().count > 0) {
|
ItemStack itemstack1 = playerinventory.getCarried();
|
||||||
entityhuman.drop(playerinventory.getCarried().a(1));
|
if (itemstack1.count > 0) {
|
||||||
|
entityhuman.drop(itemstack1.a(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (itemstack1.count == 0) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (playerinventory.getCarried().count == 0) {
|
|
||||||
playerinventory.setCarried((ItemStack) null);
|
playerinventory.setCarried((ItemStack) null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user