Skip to content

Commit

Permalink
Dont register custom item command if there are no custom items
Browse files Browse the repository at this point in the history
  • Loading branch information
EsotericEnderman committed Aug 10, 2024
1 parent 2a04f43 commit 2e5e587
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class GiveCustomItemCommand extends CommandAPICommand {
public GiveCustomItemCommand(TemplatePaperPlugin plugin) {
super("give-custom-item");

if (CustomItem.values().length == 0) {
return;
}

String customItemArgumentNodeName = "custom-item";

String[] customItemNames = Stream.of(CustomItem.values()).map((customItem) -> customItem.name()).toArray(String[]::new);
Expand Down

0 comments on commit 2e5e587

Please sign in to comment.