Displays no permission required as None instead of null

This commit is contained in:
Kristian Knarvik 2022-08-05 14:15:30 +02:00
parent af0b0fd12e
commit 5e85dfd3e4

View File

@ -104,6 +104,9 @@ public class CommandBooksWithoutBorders implements TabExecutor {
String commandInfo = "\n" + getCommandColor() + pluginCommand.getUsage().replace("<command>",
pluginCommand.getName()) + ": " + getSuccessColor() + pluginCommand.getDescription();
if (sender.hasPermission("bookswithoutborders.admin")) {
if (permission == null) {
permission = "None";
}
commandInfo += getCommandColor() + " {" + permission + "}";
}
sender.sendMessage(commandInfo);