mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
Fixed the NPE in inventoryplayer once again, thanks to don4of4
This commit is contained in:
parent
8062d5c7be
commit
256d4ba555
@ -312,7 +312,13 @@ public class InventoryPlayer implements IInventory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean b(Block block) {
|
public boolean b(Block block) {
|
||||||
if (block != null && block.material.k()) { // CraftBukkit - fix NPE
|
// CraftBukkit start - fixed NPE
|
||||||
|
if (block == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
|
||||||
|
if (block.material.k()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
ItemStack itemstack = this.getItem(this.itemInHandIndex);
|
ItemStack itemstack = this.getItem(this.itemInHandIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user