diff --git a/src/main/java/de/epiceric/shopchest/utils/Utils.java b/src/main/java/de/epiceric/shopchest/utils/Utils.java index 3fcef13..aba1f9f 100644 --- a/src/main/java/de/epiceric/shopchest/utils/Utils.java +++ b/src/main/java/de/epiceric/shopchest/utils/Utils.java @@ -270,16 +270,18 @@ public class Utils { return true; } - if (item.getDurability() == 0) { - if (player.hasPermission(Permissions.CREATE + "." + item.getType().toString())) { + if (item != null) { + if (item.getDurability() == 0) { + if (player.hasPermission(Permissions.CREATE + "." + item.getType().toString())) { + return true; + } + } + + if (player.hasPermission(Permissions.CREATE + "." + item.getType().toString() + "." + item.getDurability())) { return true; } } - if (player.hasPermission(Permissions.CREATE + "." + item.getType().toString() + "." + item.getDurability())) { - return true; - } - return false; }