T2C-OPSecurity/OpSecurity V3/src/main/java/net/t2code/opsecurity/config/opWhitelist/OPWhitelist.java

61 lines
2.5 KiB
Java

package net.t2code.opsecurity.config.opWhitelist;
import net.t2code.opsecurity.enums.ConfigParam;
import org.bukkit.GameMode;
import java.util.Arrays;
import java.util.List;
public enum OPWhitelist {
enable("opWhitelist.enable", false, ConfigParam.BOOLEAN),
playerMustBeOnlineToOp("opWhitelist.playerMustBeOnlineToOp", true, ConfigParam.BOOLEAN),
noOpPlayerDeopEnable("opWhitelist.enable", true, ConfigParam.BOOLEAN),
noOpPlayerDeopPlayerSendMessage("opWhitelist.noOpPlayerDeop.playerSendMessage", true, ConfigParam.BOOLEAN),
noOpPlayerKickEnable("opWhitelist.noOpPlayerKick.enable", true, ConfigParam.BOOLEAN),
noOpPlayerSetGameModeEnable("opWhitelist.noOpPlayerSetGameMode.enable", true, ConfigParam.BOOLEAN),
noOpPlayerSetGameModeValue("opWhitelist.noOpPlayerSetGameMode.gameMode", GameMode.SURVIVAL, ConfigParam.GAMEMODE),
customCommandsEnable("opWhitelist.customCommands.enable", false, ConfigParam.BOOLEAN),
customCommandsCommands("opWhitelist.customCommands.commands", Arrays.asList("kick [player] &4You have op but are not authorized to do so, that's why you were kicked!")
, ConfigParam.STRINGLIST),
player("opWhitelist.whitelist","opWhitelist.whitelist.KEY.name", "opWhitelist.whitelist.KEY.uuid", "PlayerName", "00000000000000000000000000000000", ConfigParam.PLAYERLIST);
public String path;
public String pathPlayerListPath;
public String pathPlayerName;
public String pathPlayerUuid;
public String valuePlayerName;
public String valuePlayerUuid;
public List<String> valueStringList;
public Boolean valueBoolean;
public GameMode valueGameMode;
public ConfigParam cEnum;
OPWhitelist(String path, GameMode value, ConfigParam cEnum) {
this.path = path;
this.valueGameMode = value;
this.cEnum = cEnum;
}
OPWhitelist(String listPath,String pathPlayerName, String pathUuid, String playerName, String uuid, ConfigParam cEnum) {
this.pathPlayerListPath = listPath;
this.pathPlayerName = pathPlayerName;
this.pathPlayerUuid = pathUuid;
this.valuePlayerName = playerName;
this.valuePlayerUuid = uuid;
this.cEnum = cEnum;
}
OPWhitelist(String path, List<String> value, ConfigParam cEnum) {
this.path = path;
this.valueStringList = value;
this.cEnum = cEnum;
}
OPWhitelist(String path, Boolean value, ConfigParam cEnum) {
this.path = path;
this.valueBoolean = value;
this.cEnum = cEnum;
}
}