Compare commits

...

5 Commits

Author SHA1 Message Date
YouHaveTrouble 6b31e7c76c bump version 2023-06-09 11:04:04 +02:00
YouHaveTrouble 1ea3f3f550 update config dependency 2023-06-09 11:03:45 +02:00
YouHaveTrouble 00f7d292fa Merge pull request #70 from DaJokni/1.20
Update ConfigurationMaster-API to add 1.20 support
2023-06-07 23:52:43 +02:00
DaJokni 653cd0e242 Change protocollib version to 5.0.0, because snapshot no longer exists 2023-06-07 22:29:20 +03:00
DaJokni 6b1763a260 Update ConfigurationMaster-API to add 1.20 support 2023-06-07 22:27:15 +03:00
7 changed files with 23 additions and 13 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</parent>
<artifactId>Bukkit</artifactId>
@@ -110,7 +110,7 @@
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>5.0.0-SNAPSHOT</version>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
+2 -2
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</parent>
<artifactId>Common</artifactId>
@@ -76,7 +76,7 @@
<dependency>
<groupId>com.github.thatsmusic99</groupId>
<artifactId>ConfigurationMaster-API</artifactId>
<version>v2.0.0-BETA-1</version>
<version>v2.0.0-BETA-6</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -84,11 +84,12 @@ public class CommandUtil {
return false;
}
ConfigFile dumpFile = ConfigFile.loadConfig(file);
dumpFile.set("commands", serverCommands);
try {
ConfigFile dumpFile = ConfigFile.loadConfig(file);
dumpFile.set("commands", serverCommands);
dumpFile.save();
} catch (IOException e) {
} catch (Exception e) {
return false;
}
return true;
@@ -24,13 +24,22 @@ public class ConfigCache {
this.canDoProtocolLib = canDoProtocolLib;
this.logger = logger;
reloadConfig();
try {
reloadConfig();
} catch (Exception e) {
e.printStackTrace();
}
}
public boolean reloadConfig() {
createFiles();
config = ConfigFile.loadConfig(configFile);
try {
config = ConfigFile.loadConfig(configFile);
} catch (Exception e) {
e.printStackTrace();
return false;
}
config.addDefault("messages.prefix", "CommandWhitelist > ");
config.addDefault("messages.command_denied", "No such command.");
@@ -106,7 +115,7 @@ public class ConfigCache {
try {
config.save();
return true;
} catch (IOException e) {
} catch (Exception e) {
return false;
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</parent>
<artifactId>Velocity</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
</parent>
<artifactId>Waterfall</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version>
<version>2.8.0</version>
<modules>
<module>CommandWhitelistCommon</module>
<module>CommandWhitelistBukkit</module>