consumer, String pluginVersion, Integer spigotID, String gitKey) {
String RepoURL = "https://git.t2code.net/api/v1/repos/" + gitKey + "/releases?limit=1";
- if (!(boolean)T2CBlibConfig.VALUES.seePreReleaseUpdates.getValue() ) {
+ if (!(boolean) T2CB_LibConfig.VALUES.seePreReleaseUpdates.getValue() ) {
RepoURL = RepoURL + "&pre-release=false";
}
String finalRepoURL = RepoURL;
@@ -82,8 +82,8 @@ public class T2CVupdateCheckerGit {
consumer.accept(webData);
} catch (Exception var10) {
Boolean load = false;
- if (T2CVupdateAPI.bungeePluginVersins.containsKey(plugin.getDescription().getName().toString())) {
- load = T2CVupdateAPI.bungeePluginVersins.get(plugin.getDescription().getName().toString()).load;
+ if (T2CV_UpdateAPI.bungeePluginVersins.containsKey(plugin.getDescription().getName().toString())) {
+ load = T2CV_UpdateAPI.bungeePluginVersins.get(plugin.getDescription().getName().toString()).load;
}
T2CupdateObject update = new T2CupdateObject(
plugin.getDescription().getName().toString(),
@@ -93,7 +93,7 @@ public class T2CVupdateCheckerGit {
false,
true
);
- T2CVupdateAPI.bungeePluginVersins.put(plugin.getDescription().getName().toString(), update);
+ T2CV_UpdateAPI.bungeePluginVersins.put(plugin.getDescription().getName().toString(), update);
logger.error("Cannot look for updates: {}", var10.getMessage());
}
diff --git a/src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CVconfigWriter.java b/src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CV_ConfigWriter.java
similarity index 99%
rename from src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CVconfigWriter.java
rename to src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CV_ConfigWriter.java
index 01cab2b..f0a5465 100644
--- a/src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CVconfigWriter.java
+++ b/src/main/java/net/t2code/t2codelib/VELOCITY/api/yml/T2CV_ConfigWriter.java
@@ -13,7 +13,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-public class T2CVconfigWriter {
+public class T2CV_ConfigWriter {
public static void createConfig(Logger logger, File configFile, T2CconfigItem[] manager, String... header) throws IOException {
boolean exist = configFile.exists();
diff --git a/src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CodeVMain.java b/src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CV_Main.java
similarity index 59%
rename from src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CodeVMain.java
rename to src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CV_Main.java
index 417e13b..78e0cb4 100644
--- a/src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CodeVMain.java
+++ b/src/main/java/net/t2code/t2codelib/VELOCITY/system/T2CV_Main.java
@@ -12,20 +12,20 @@ import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
import lombok.Getter;
import net.t2code.t2codelib.Util;
-import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.T2CVplmsgCmd;
-import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.autoResponse.T2CVapiAutoResponse;
-import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.commandgui.T2CVapiCGUI;
-import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.opSecurity.T2CVapiOpSecurity;
-import net.t2code.t2codelib.VELOCITY.api.proxyPlayers.T2CVPlayers;
-import net.t2code.t2codelib.VELOCITY.api.update.T2CVupdateAPI;
-import net.t2code.t2codelib.VELOCITY.system.bstats.Metrics;
-import net.t2code.t2codelib.VELOCITY.system.config.T2CVlibConfig;
+import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.T2CV_PluginMessageProxyCommand;
+import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.autoResponse.T2CV_API_AutoResponse;
+import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.commandgui.T2CV_API_CGUI;
+import net.t2code.t2codelib.VELOCITY.api.pluginMessaging.opSecurity.T2CV_API_OpSecurity;
+import net.t2code.t2codelib.VELOCITY.api.proxyPlayers.T2CV_Players;
+import net.t2code.t2codelib.VELOCITY.api.update.T2CV_UpdateAPI;
+import net.t2code.t2codelib.VELOCITY.system.bstats.T2CV_Metrics;
+import net.t2code.t2codelib.VELOCITY.system.config.T2CV_LibConfig;
import org.slf4j.Logger;
import java.io.IOException;
import java.nio.file.Path;
-public class T2CodeVMain {
+public class T2CV_Main {
@Getter
private static ProxyServer server;
@@ -38,22 +38,22 @@ public class T2CodeVMain {
@Getter
private static Path dataDirectory;
- private final Metrics.Factory metricsFactory;
+ private final T2CV_Metrics.Factory metricsFactory;
- public static final MinecraftChannelIdentifier bcmd = MinecraftChannelIdentifier.from("t2c:bcmd");
- public static final MinecraftChannelIdentifier bonlp = MinecraftChannelIdentifier.from("t2c:bonlp");
- public static final MinecraftChannelIdentifier cguiopl = MinecraftChannelIdentifier.from("t2c:cguiopl");
- public static final MinecraftChannelIdentifier aresp = MinecraftChannelIdentifier.from("t2c:aresp");
- public static final MinecraftChannelIdentifier opsec = MinecraftChannelIdentifier.from("t2c:opsec");
+ public static final MinecraftChannelIdentifier bcmd = MinecraftChannelIdentifier.from(Util.getPluginChannel_ProxyCommand());
+ public static final MinecraftChannelIdentifier bonlp = MinecraftChannelIdentifier.from(Util.getPluginChannel_ProxyOnlinePlayers());
+ public static final MinecraftChannelIdentifier cguiopl = MinecraftChannelIdentifier.from(Util.getPluginChannel_CGUIOnlinePlayers());
+ public static final MinecraftChannelIdentifier aresp = MinecraftChannelIdentifier.from(Util.getPluginChannel_AutoResponse());
+ public static final MinecraftChannelIdentifier opsec = MinecraftChannelIdentifier.from(Util.getPluginChannel_OPSecurity());
@Inject
- public T2CodeVMain(ProxyServer server, Logger logger, @DataDirectory Path dataDirectory, Metrics.Factory metricsFactory) {
+ public T2CV_Main(ProxyServer server, Logger logger, @DataDirectory Path dataDirectory, T2CV_Metrics.Factory metricsFactory) {
starttime = System.currentTimeMillis();
- T2CodeVMain.server = server;
- T2CodeVMain.logger = logger;
- T2CodeVMain.dataDirectory = dataDirectory;
+ T2CV_Main.server = server;
+ T2CV_Main.logger = logger;
+ T2CV_Main.dataDirectory = dataDirectory;
this.metricsFactory = metricsFactory;
@@ -75,7 +75,7 @@ public class T2CodeVMain {
logger.info("║ Discord: {}", Util.getDiscord());
try {
- T2CVlibConfig.set(dataDirectory, logger);
+ T2CV_LibConfig.set(dataDirectory, logger);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
@@ -85,28 +85,28 @@ public class T2CodeVMain {
//API
- server.getEventManager().register(this, new T2CVplmsgCmd(server, logger));
+ server.getEventManager().register(this, new T2CV_PluginMessageProxyCommand(server, logger));
- server.getChannelRegistrar().register(T2CodeVMain.bonlp);
- T2CVPlayers.sendToSpigotDeleteAll();
+ server.getChannelRegistrar().register(T2CV_Main.bonlp);
+ T2CV_Players.sendToSpigotDeleteAll();
- if ((boolean) T2CVlibConfig.VALUES.apiCommandGUIEnable.getValue()) {
- server.getEventManager().register(this, new T2CVapiCGUI(server, logger));
- T2CVapiCGUI.sendToSpigotDeleteAll();
+ if ((boolean) T2CV_LibConfig.VALUES.apiCommandGUIEnable.getValue()) {
+ server.getEventManager().register(this, new T2CV_API_CGUI(server, logger));
+ T2CV_API_CGUI.sendToSpigotDeleteAll();
}
- if ((boolean) T2CVlibConfig.VALUES.apiAutoResponse.getValue()) {
- server.getEventManager().register(this, new T2CVapiAutoResponse(server, logger));
+ if ((boolean) T2CV_LibConfig.VALUES.apiAutoResponse.getValue()) {
+ server.getEventManager().register(this, new T2CV_API_AutoResponse(server, logger));
}
- if ((boolean) T2CVlibConfig.VALUES.apiOpSecurity.getValue()) {
- server.getEventManager().register(this, new T2CVapiOpSecurity(server, logger));
+ if ((boolean) T2CV_LibConfig.VALUES.apiOpSecurity.getValue()) {
+ server.getEventManager().register(this, new T2CV_API_OpSecurity(server, logger));
}
- Metrics.bStats(this, Util.getBstatsID(), metricsFactory);
- T2CVupdateAPI.onUpdateCheckTimer(logger, plugin, server, Util.getVPrefix(), Util.getDiscord(), Util.getSpigotID(), Util.getGit());
+ T2CV_Metrics.bStats(this, Util.getBstatsID(), metricsFactory);
+ T2CV_UpdateAPI.onUpdateCheckTimer(logger, plugin, server, Util.getVPrefix(), Util.getDiscord(), Util.getSpigotID(), Util.getGit());
logger.info("║");
logger.info("║ Plugin loaded successfully - {}ms", System.currentTimeMillis() - starttime);
logger.info("╚════════════════════════════════════");
diff --git a/src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/Metrics.java b/src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/T2CV_Metrics.java
similarity index 98%
rename from src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/Metrics.java
rename to src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/T2CV_Metrics.java
index c226a03..3c43782 100644
--- a/src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/Metrics.java
+++ b/src/main/java/net/t2code/t2codelib/VELOCITY/system/bstats/T2CV_Metrics.java
@@ -55,15 +55,15 @@ import java.util.stream.Collectors;
import java.util.zip.GZIPOutputStream;
import javax.net.ssl.HttpsURLConnection;
-import net.t2code.t2codelib.VELOCITY.system.T2CodeVMain;
+import net.t2code.t2codelib.VELOCITY.system.T2CV_Main;
import org.slf4j.Logger;
-public class Metrics {
+public class T2CV_Metrics {
- public static void bStats(T2CodeVMain plugin, Integer bstatsID, Metrics.Factory metricsFactory) {
+ public static void bStats(T2CV_Main plugin, Integer bstatsID, T2CV_Metrics.Factory metricsFactory) {
int pluginId = bstatsID; // <-- Replace with the id of your plugin!
- Metrics metrics = metricsFactory.make(plugin, pluginId);
+ T2CV_Metrics metrics = metricsFactory.make(plugin, pluginId);
}
/** A factory to create new Metrics classes. */
@@ -94,8 +94,8 @@ public class Metrics {
* @return A Metrics instance that can be used to register custom charts.
* The return value can be ignored, when you do not want to register custom charts.
*/
- public Metrics make(Object plugin, int serviceId) {
- return new Metrics(plugin, server, logger, dataDirectory, serviceId);
+ public T2CV_Metrics make(Object plugin, int serviceId) {
+ return new T2CV_Metrics(plugin, server, logger, dataDirectory, serviceId);
}
}
@@ -105,7 +105,7 @@ public class Metrics {
private MetricsBase metricsBase;
- private Metrics(
+ private T2CV_Metrics(
Object plugin, ProxyServer server, Logger logger, Path dataDirectory, int serviceId) {
pluginContainer =
server
diff --git a/src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CVlibConfig.java b/src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CV_LibConfig.java
similarity index 87%
rename from src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CVlibConfig.java
rename to src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CV_LibConfig.java
index 822279c..c80b2c7 100644
--- a/src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CVlibConfig.java
+++ b/src/main/java/net/t2code/t2codelib/VELOCITY/system/config/T2CV_LibConfig.java
@@ -3,8 +3,8 @@ package net.t2code.t2codelib.VELOCITY.system.config;
import net.t2code.t2codelib.T2CLanguageEnum;
import net.t2code.t2codelib.T2CconfigItem;
import net.t2code.t2codelib.Util;
-import net.t2code.t2codelib.VELOCITY.api.messages.T2CVsend;
-import net.t2code.t2codelib.VELOCITY.api.yml.T2CVconfigWriter;
+import net.t2code.t2codelib.VELOCITY.api.messages.T2CV_Send;
+import net.t2code.t2codelib.VELOCITY.api.yml.T2CV_ConfigWriter;
import org.slf4j.Logger;
import java.io.File;
@@ -13,7 +13,7 @@ import java.nio.file.Path;
import java.util.HashMap;
import java.util.List;
-public class T2CVlibConfig {
+public class T2CV_LibConfig {
public enum VALUES implements T2CconfigItem {
updateTimer("updateCheck.timerInMin", 60, true,
@@ -89,7 +89,7 @@ public class T2CVlibConfig {
public static void set(Path dataDirectory, Logger logger) throws IOException {
long long_ = System.currentTimeMillis();
- T2CVconfigWriter.createConfig(logger, new File(dataDirectory.getParent() + "/T2CodeLib", "config.yml"), VALUES.values(), Util.getConfigLogo());
- T2CVsend.info(logger, "║ The config.yml were successfully created / updated." + " - " + (System.currentTimeMillis() - long_) + "ms");
+ T2CV_ConfigWriter.createConfig(logger, new File(dataDirectory.getParent() + "/T2CodeLib", "config.yml"), VALUES.values(), Util.getConfigLogo());
+ T2CV_Send.info(logger, "║ The config.yml were successfully created / updated." + " - " + (System.currentTimeMillis() - long_) + "ms");
}
}