this can be null

This commit is contained in:
2021-10-26 14:04:21 +02:00
parent d6909b4f25
commit 0cc2633604
@@ -1,10 +1,12 @@
package eu.endermite.commandwhitelist.common; package eu.endermite.commandwhitelist.common;
import org.jetbrains.annotations.Nullable;
import java.util.*; import java.util.*;
public class CWGroup { public class CWGroup {
private final String id, permission, custom_command_denied_message; private final String id, permission, commandDeniedMessage;
private final HashSet<String> commands = new HashSet<>(); private final HashSet<String> commands = new HashSet<>();
private final HashSet<String> subCommands = new HashSet<>(); private final HashSet<String> subCommands = new HashSet<>();
@@ -12,7 +14,7 @@ public class CWGroup {
this.id = id; this.id = id;
this.permission = "commandwhitelist.group." + id; this.permission = "commandwhitelist.group." + id;
this.commands.addAll(commands); this.commands.addAll(commands);
this.custom_command_denied_message = custom_command_denied_message; this.commandDeniedMessage = custom_command_denied_message;
this.subCommands.addAll(subCommands); this.subCommands.addAll(subCommands);
} }
@@ -28,8 +30,8 @@ public class CWGroup {
return commands; return commands;
} }
public String getCustomCommandDeniedMessage() { public @Nullable String getCommandDeniedMessage() {
return custom_command_denied_message; return commandDeniedMessage;
} }
public void addCommand(String command) { public void addCommand(String command) {