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> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version> <version>2.8.0</version>
</parent> </parent>
<artifactId>Bukkit</artifactId> <artifactId>Bukkit</artifactId>
@@ -110,7 +110,7 @@
<dependency> <dependency>
<groupId>com.comphenix.protocol</groupId> <groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId> <artifactId>ProtocolLib</artifactId>
<version>5.0.0-SNAPSHOT</version> <version>5.0.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
+2 -2
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version> <version>2.8.0</version>
</parent> </parent>
<artifactId>Common</artifactId> <artifactId>Common</artifactId>
@@ -76,7 +76,7 @@
<dependency> <dependency>
<groupId>com.github.thatsmusic99</groupId> <groupId>com.github.thatsmusic99</groupId>
<artifactId>ConfigurationMaster-API</artifactId> <artifactId>ConfigurationMaster-API</artifactId>
<version>v2.0.0-BETA-1</version> <version>v2.0.0-BETA-6</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
@@ -84,11 +84,12 @@ public class CommandUtil {
return false; return false;
} }
try {
ConfigFile dumpFile = ConfigFile.loadConfig(file); ConfigFile dumpFile = ConfigFile.loadConfig(file);
dumpFile.set("commands", serverCommands); dumpFile.set("commands", serverCommands);
try {
dumpFile.save(); dumpFile.save();
} catch (IOException e) { } catch (Exception e) {
return false; return false;
} }
return true; return true;
@@ -24,13 +24,22 @@ public class ConfigCache {
this.canDoProtocolLib = canDoProtocolLib; this.canDoProtocolLib = canDoProtocolLib;
this.logger = logger; this.logger = logger;
try {
reloadConfig(); reloadConfig();
} catch (Exception e) {
e.printStackTrace();
}
} }
public boolean reloadConfig() { public boolean reloadConfig() {
createFiles(); createFiles();
try {
config = ConfigFile.loadConfig(configFile); config = ConfigFile.loadConfig(configFile);
} catch (Exception e) {
e.printStackTrace();
return false;
}
config.addDefault("messages.prefix", "CommandWhitelist > "); config.addDefault("messages.prefix", "CommandWhitelist > ");
config.addDefault("messages.command_denied", "No such command."); config.addDefault("messages.command_denied", "No such command.");
@@ -106,7 +115,7 @@ public class ConfigCache {
try { try {
config.save(); config.save();
return true; return true;
} catch (IOException e) { } catch (Exception e) {
return false; return false;
} }
} }
+1 -1
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version> <version>2.8.0</version>
</parent> </parent>
<artifactId>Velocity</artifactId> <artifactId>Velocity</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version> <version>2.8.0</version>
</parent> </parent>
<artifactId>Waterfall</artifactId> <artifactId>Waterfall</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.7.0</version> <version>2.8.0</version>
<modules> <modules>
<module>CommandWhitelistCommon</module> <module>CommandWhitelistCommon</module>
<module>CommandWhitelistBukkit</module> <module>CommandWhitelistBukkit</module>