This commit is contained in:
JaTiTV 2022-11-15 15:31:26 +01:00
parent b825152415
commit 3050ad337d
5 changed files with 32 additions and 7 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId> <artifactId>CommandGUI_V2</artifactId>
<version>2.8.11</version> <version>2.8.12</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>CommandGUI</name> <name>CommandGUI</name>
@ -75,8 +75,7 @@
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>DEV-13.0</version> <version>13.4</version>
<classifier>dev-5</classifier>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>

View File

@ -15,10 +15,8 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
public class ConfigCreate { public class ConfigCreate {
public static void configCreate() { public static void configCreate() {
long long_ = System.currentTimeMillis(); long long_ = System.currentTimeMillis();
if (new File(Main.getPath(), "config.yml").exists()) { if (new File(Main.getPath(), "config.yml").exists()) {
@ -31,6 +29,9 @@ public class ConfigCreate {
if (!config.exists()) T2Cconfig.set("ConfigVersion", Util.getConfigVersion(), yamlConfiguration); if (!config.exists()) T2Cconfig.set("ConfigVersion", Util.getConfigVersion(), yamlConfiguration);
T2Cconfig.set("Plugin.Debug", false, yamlConfiguration); T2Cconfig.set("Plugin.Debug", false, yamlConfiguration);
T2Cconfig.set("Plugin.updateCheck.onJoin", true, yamlConfiguration);
T2Cconfig.set("Plugin.updateCheck.seePreReleaseUpdates", true, yamlConfiguration);
T2Cconfig.set("Plugin.updateCheck.timeInterval", 60, yamlConfiguration);
T2Cconfig.set("Plugin.HelpAlias", true, yamlConfiguration); T2Cconfig.set("Plugin.HelpAlias", true, yamlConfiguration);
T2Cconfig.set("Plugin.AdminSubCommand", "admin", yamlConfiguration); T2Cconfig.set("Plugin.AdminSubCommand", "admin", yamlConfiguration);
T2Cconfig.set("Plugin.language", "english", yamlConfiguration); T2Cconfig.set("Plugin.language", "english", yamlConfiguration);

View File

@ -32,6 +32,9 @@ public class SelectConfig {
} }
Debug = yamlConfiguration.getBoolean("Plugin.Debug"); Debug = yamlConfiguration.getBoolean("Plugin.Debug");
updateCheckOnJoin = yamlConfiguration.getBoolean("Plugin.updateCheck.onJoin");
updateCheckSeePreReleaseUpdates = yamlConfiguration.getBoolean("Plugin.updateCheck.seePreReleaseUpdates");
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.updateCheck.timeInterval");
HelpAlias = yamlConfiguration.getBoolean("Plugin.HelpAlias"); HelpAlias = yamlConfiguration.getBoolean("Plugin.HelpAlias");
adminSubCommand = yamlConfiguration.getString("Plugin.AdminSubCommand").toLowerCase(); adminSubCommand = yamlConfiguration.getString("Plugin.AdminSubCommand").toLowerCase();
language = yamlConfiguration.getString("Plugin.language"); language = yamlConfiguration.getString("Plugin.language");
@ -264,6 +267,10 @@ public class SelectConfig {
} }
private static Boolean Debug; private static Boolean Debug;
private static Boolean updateCheckOnJoin;
private static Boolean updateCheckSeePreReleaseUpdates;
private static Integer updateCheckTimeInterval;
private static Boolean HelpAlias; private static Boolean HelpAlias;
private static String adminSubCommand; private static String adminSubCommand;
private static String language; private static String language;
@ -370,6 +377,18 @@ public class SelectConfig {
return Debug; return Debug;
} }
public static Boolean getUpdateCheckOnJoin() {
return updateCheckOnJoin;
}
public static Boolean getUpdateCheckSeePreReleaseUpdates() {
return updateCheckSeePreReleaseUpdates;
}
public static Integer getUpdateCheckTimeInterval() {
return updateCheckTimeInterval;
}
public static Boolean getHelpAlias() { public static Boolean getHelpAlias() {
return HelpAlias; return HelpAlias;
} }

View File

@ -22,6 +22,7 @@ import net.t2code.commandguiv2.Spigot.config.config.SelectConfig;
import net.t2code.commandguiv2.Spigot.database.SQLITE; import net.t2code.commandguiv2.Spigot.database.SQLITE;
import net.t2code.commandguiv2.Spigot.database.SelectDatabase; import net.t2code.commandguiv2.Spigot.database.SelectDatabase;
import net.t2code.commandguiv2.Spigot.enums.StorageEnum; import net.t2code.commandguiv2.Spigot.enums.StorageEnum;
import net.t2code.commandguiv2.Util;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend; import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate; import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion; import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion;
@ -177,7 +178,8 @@ public class Load {
Bukkit.getServer().getPluginManager().registerEvents(new EventsFrom110(), plugin); Bukkit.getServer().getPluginManager().registerEvents(new EventsFrom110(), plugin);
} }
T2CupdateAPI.onUpdateCheck(plugin, prefix, spigotID, discord); T2CupdateAPI.onUpdateCheck(plugin, prefix, Util.getGit(),spigotID,discord
,SelectConfig.getUpdateCheckOnJoin(),SelectConfig.getUpdateCheckSeePreReleaseUpdates(),SelectConfig.getUpdateCheckTimeInterval());
Metrics.Bstats(); Metrics.Bstats();
Main.addonLoad(); Main.addonLoad();
T2Ctemplate.onLoadFooter(prefix, long_); T2Ctemplate.onLoadFooter(prefix, long_);

View File

@ -7,7 +7,7 @@ public class Util {
} }
public static String getRequiredT2CodeLibVersion() { public static String getRequiredT2CodeLibVersion() {
return "13.0"; return "13.4";
} }
public static String getPrefix() { public static String getPrefix() {
@ -18,6 +18,10 @@ public class Util {
return 90671; return 90671;
} }
public static String getGit() {
return "JaTiTV/T2C-CommandGUI";
}
public static Integer getBstatsID() { public static Integer getBstatsID() {
return 10840; return 10840;
} }