This commit is contained in:
JaTiTV 2024-07-08 00:52:53 +02:00
parent 6489b6bb7a
commit cefdc37707
2 changed files with 3 additions and 37 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2C-OPSecurity</artifactId>
<version>3.3_DEV-23</version>
<version>3.3_DEV-24</version>
<packaging>jar</packaging>
@ -80,7 +80,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>16.7</version>
<classifier>dev-23</classifier>
<classifier>dev-24</classifier>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -1,11 +1,10 @@
package net.t2code.opsecurity.config.config;
import net.t2code.opsecurity.util.Util;
import net.t2code.opsecurity.config.opWhitelist.OPWhitelist;
import net.t2code.opsecurity.config.permissionWhitelist.PermissionWhitelist;
import net.t2code.opsecurity.objects.PlayerObject;
import net.t2code.opsecurity.system.Main;
import net.t2code.t2codelib.SPIGOT.api.debug.T2C_Debug;
import net.t2code.opsecurity.util.Util;
import net.t2code.t2codelib.SPIGOT.api.yaml.T2C_ConfigWriter;
import net.t2code.t2codelib.util.T2C_ConfigItem;
import net.t2code.t2codelib.util.T2C_LanguageEnum;
@ -114,39 +113,6 @@ public class Converter {
}
}
public static void convertCheck() {
File config = new File(Main.getPath(), "config.yml");
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
if (!yamlConfiguration.contains("check.onJoin.enable")) {
Boolean onJoin = yamlConfiguration.getBoolean("check.onJoin");
T2C_Debug.debugmsg(Main.getPlugin(), "onJoin = " + onJoin);
yamlConfiguration.set("check.onJoin.enable", onJoin);
}
if (!yamlConfiguration.contains("check.onInteract.enable")) {
Boolean onInteract = yamlConfiguration.getBoolean("check.onInteract");
T2C_Debug.debugmsg(Main.getPlugin(), "onInteract = " + onInteract);
yamlConfiguration.set("check.onInteract.enable", onInteract);
}
if (!yamlConfiguration.contains("check.onCommand.enable")) {
Boolean onCommand = yamlConfiguration.getBoolean("check.onCommand");
T2C_Debug.debugmsg(Main.getPlugin(), "onCommand = " + onCommand);
yamlConfiguration.set("check.onCommand.enable", onCommand);
}
if (!yamlConfiguration.contains("check.onChat.enable")) {
Boolean onChat = yamlConfiguration.getBoolean("check.onChat");
T2C_Debug.debugmsg(Main.getPlugin(), "onChat = " + onChat);
yamlConfiguration.set("check.onChat.enable", onChat);
}
try {
yamlConfiguration.save(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private static void setConfig(String path, T2C_ConfigItem item) {
if (yamlConfigurationOld.contains(path)) {
item.setValue(yamlConfigurationOld.get(path));