diff --git a/src/main/java/io/josemmo/bukkit/plugin/commands/ImageCommandBridge.java b/src/main/java/io/josemmo/bukkit/plugin/commands/ImageCommandBridge.java index 6145f40..06d8c69 100644 --- a/src/main/java/io/josemmo/bukkit/plugin/commands/ImageCommandBridge.java +++ b/src/main/java/io/josemmo/bukkit/plugin/commands/ImageCommandBridge.java @@ -13,7 +13,6 @@ import org.bukkit.World; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; -import java.util.Objects; public class ImageCommandBridge { public static final String COMMAND_NAME = "yamipa"; @@ -161,7 +160,8 @@ public static void register(@NotNull YamipaPlugin plugin) { private static void fixPermissions(@NotNull String commandName) { org.bukkit.command.Command command = Internals.getCommandMap().getCommand(commandName); - Objects.requireNonNull(command); - command.setPermission(null); + if (command != null) { // Command may have been aliased to null in "commands.yml" + command.setPermission(null); + } } }