Fixed NPE

This commit is contained in:
Auxilor
2021-06-17 09:39:24 +01:00
parent ed6f23b74e
commit f4d191ea15

View File

@@ -171,8 +171,11 @@ public class TalismanChecks {
}
if (readShulkerBoxes) {
ItemMeta meta = rawContent.getItemMeta();
if (meta instanceof BlockStateMeta) {
BlockStateMeta shulkerMeta = (BlockStateMeta) meta;
if (meta instanceof BlockStateMeta shulkerMeta) {
if (!shulkerMeta.hasBlockState()) {
continue;
}
BlockState state = shulkerMeta.getBlockState();
if (state instanceof ShulkerBox) {
ShulkerBox shulkerBox = (ShulkerBox) state;