mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 22:38:11 +01:00
Fix a NullPointerException.
This commit is contained in:
parent
f15785669a
commit
d8199aaa39
1 changed files with 7 additions and 5 deletions
|
@ -119,12 +119,14 @@ public abstract class Container {
|
|||
}
|
||||
|
||||
if (j == 1) {
|
||||
// CraftBukkit start
|
||||
if (playerinventory.getCarried().count > 0) {
|
||||
entityhuman.drop(playerinventory.getCarried().a(1));
|
||||
// CraftBukkit start - Store a reference
|
||||
ItemStack itemstack1 = playerinventory.getCarried();
|
||||
if (itemstack1.count > 0) {
|
||||
entityhuman.drop(itemstack1.a(1));
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (playerinventory.getCarried().count == 0) {
|
||||
|
||||
if (itemstack1.count == 0) {
|
||||
// CraftBukkit end
|
||||
playerinventory.setCarried((ItemStack) null);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue