mirror of
https://github.com/RayzsYT/ProAntiTab.git
synced 2026-12-01 04:49:44 -05:00
Fix Velocity Support
This commit is contained in:
1 parent
bfd9430b9b
commit
52c5f36573
4 files changed
+10
-3
No files matched your search
@@ -21,6 +21,7 @@ import de.rayzs.pat.utils.ConnectionBuilder;
|
||||
import de.rayzs.pat.utils.MessageTranslator;
|
||||
import de.rayzs.pat.utils.Reflection;
|
||||
import de.rayzs.pat.utils.Storage;
|
||||
import de.rayzs.pat.utils.configuration.Configurator;
|
||||
import de.rayzs.pat.utils.group.GroupManager;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
|
||||
@@ -50,6 +51,10 @@ public class VelocityLoader {
|
||||
@Subscribe
|
||||
public void onProxyInitialization(ProxyInitializeEvent event) {
|
||||
Reflection.initialize(server);
|
||||
|
||||
Configurator.createResourcedFile("./plugins/ProAntiTab", "files\\velocity-config.yml", "config.yml", false);
|
||||
Configurator.createResourcedFile("./plugins/ProAntiTab", "files\\velocity-storage.yml", "storage.yml", false);
|
||||
|
||||
Storage.load();
|
||||
GroupManager.initialize();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Storage {
|
||||
UNKNOWN_COMMAND = (ArrayList<String>) CONFIGURATION.getOrSet("custom-unknown-command.message", defaultUnknownCommandArray);
|
||||
}
|
||||
|
||||
TOKEN = (String) CONFIGURATION.getOrSet(Reflection.isProxyServer() ? "token" : "handle-through-bungeecord.token", Reflection.isProxyServer() ? TOKEN : "insert-token-of-bungeecord-here");
|
||||
TOKEN = (String) CONFIGURATION.getOrSet(Reflection.isProxyServer() && !Reflection.isVelocityServer() ? "token" : "handle-through-bungeecord.token", Reflection.isProxyServer() ? TOKEN : "insert-token-of-bungeecord-here");
|
||||
|
||||
NOTIFY_ENABLED = (String) CONFIGURATION.getOrSet("notification.enabled", "&aEnabled notifications!");
|
||||
NOTIFY_DISABLED = (String) CONFIGURATION.getOrSet("notification.disabled", "&cDisabled notifications!");
|
||||
|
||||
@@ -73,4 +73,8 @@ public class Configurator {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void createResourcedFile(String dataFolder, String resourcePath, String exportRessourcePath, boolean replace) {
|
||||
createResourcedFile(new File(dataFolder), resourcePath, exportRessourcePath, replace);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user