3.0.4
Bugfix: - In Permission Whitelist, the customCommands function did not work as expected.
This commit is contained in:
parent
466314f206
commit
43e51fee59
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2C-OPSecurity</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>3.0.4</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
@ -47,7 +47,7 @@ public class PermissionCheck {
|
||||
T2Csend.console(Language.permissionWhitelistNotifyKick.value.replace("[player]",
|
||||
player.getName()).replace("[perm]", perm).replace("[uuid]",String.valueOf(player.getUniqueId())));
|
||||
}
|
||||
if (PermissionWhitelist.customCommandsCommands.valueBoolean) {
|
||||
if (PermissionWhitelist.customCommandsEnable.valueBoolean) {
|
||||
for (String cmd : PermissionWhitelist.customCommandsCommands.valueStringList) {
|
||||
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("[perm]", perm));
|
||||
}
|
||||
|
@ -24,12 +24,12 @@ public class FileSelect {
|
||||
File config = new File(Main.getPath(), "config.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
for (Config value : Config.values()) {
|
||||
switch (value.cEnum) {
|
||||
switch (value.configParam) {
|
||||
case STRING:
|
||||
if (!yamlConfiguration.contains(value.path)) {
|
||||
yamlConfiguration.set(value.path, value.valueString);
|
||||
}
|
||||
value.valueString = T2Creplace.replace(Util.getPrefix(), yamlConfiguration.getString(value.path));
|
||||
value.valueString = T2Creplace.replace(Util.getPrefix(), Objects.requireNonNull(yamlConfiguration.getString(value.path)));
|
||||
break;
|
||||
case SOUND:
|
||||
if (!yamlConfiguration.contains(value.path)) {
|
||||
@ -143,7 +143,7 @@ public class FileSelect {
|
||||
String name = yamlConfiguration.getString(value.pathPlayerName.replace("KEY", key));
|
||||
PlayerObject playerObject = new PlayerObject(
|
||||
name,
|
||||
yamlConfiguration.getString(value.pathPlayerUuid.replace("KEY", key).replace("-", "")));
|
||||
yamlConfiguration.getString(value.pathPlayerUuid.replace("KEY", key)).replace("-", ""));
|
||||
PlayerCash.getOpHashMap().put(name, playerObject);
|
||||
}
|
||||
break;
|
||||
|
@ -31,30 +31,30 @@ public enum Config {
|
||||
public Integer valueInt;
|
||||
public Boolean valueBoolean;
|
||||
public Sound sound;
|
||||
public ConfigParam cEnum;
|
||||
public ConfigParam configParam;
|
||||
|
||||
Config(String path, String value, ConfigParam cEnum) {
|
||||
this.path = path;
|
||||
this.valueString = value;
|
||||
this.cEnum = cEnum;
|
||||
this.configParam = cEnum;
|
||||
}
|
||||
|
||||
Config(String path, Sound value, ConfigParam cEnum) {
|
||||
this.path = path;
|
||||
this.sound = value;
|
||||
this.cEnum = cEnum;
|
||||
this.configParam = cEnum;
|
||||
}
|
||||
|
||||
Config(String path, Integer value, ConfigParam cEnum) {
|
||||
this.path = path;
|
||||
this.valueInt = value;
|
||||
this.cEnum = cEnum;
|
||||
this.configParam = cEnum;
|
||||
}
|
||||
|
||||
Config(String path, Boolean value, ConfigParam cEnum) {
|
||||
this.path = path;
|
||||
this.valueBoolean = value;
|
||||
this.cEnum = cEnum;
|
||||
this.configParam = cEnum;
|
||||
}
|
||||
|
||||
public static Sound sound() {
|
||||
|
Loading…
Reference in New Issue
Block a user