Fix NPE
Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
d70dda463c
Commit
501a743ff9
@ -32,12 +32,13 @@ public class InventoryListener_15 {
|
||||
public static boolean checkItemStack(ItemStack item) {
|
||||
net.minecraft.server.v1_15_R1.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
|
||||
NBTTagCompound tag = nmsItem.getTag();
|
||||
assert tag != null;
|
||||
if (tag != null && tag.hasKey("BlockEntityTag")) {
|
||||
NBTTagCompound blockTag = tag.getCompound("BlockEntityTag");
|
||||
assert blockTag != null;
|
||||
if (blockTag.hasKey("Items")) {
|
||||
return drillDown(blockTag.getList("Items", 10), 0, 0) > threshold;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren