From d95de86b58b4050c7370ecf911d6fa84a6228b34 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Wed, 3 Jul 2024 03:30:07 +0200 Subject: [PATCH] T2CodeLib load change --- .../java/net/t2code/alias/Spigot/Main.java | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/src/main/java/net/t2code/alias/Spigot/Main.java b/src/main/java/net/t2code/alias/Spigot/Main.java index 6449561..af94eeb 100644 --- a/src/main/java/net/t2code/alias/Spigot/Main.java +++ b/src/main/java/net/t2code/alias/Spigot/Main.java @@ -9,6 +9,7 @@ import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate; import net.t2code.t2codelib.SPIGOT.api.minecraftVersion.T2CmcVersion; import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain; import org.bukkit.Bukkit; +import org.bukkit.event.Listener; import org.bukkit.plugin.java.JavaPlugin; import java.io.File; @@ -37,12 +38,6 @@ public final class Main extends JavaPlugin { public static ArrayList allSubAliases = new ArrayList<>(); public static ArrayList allForSubAliases = new ArrayList<>(); - // private BukkitCommandWrap bukkitCommandWrap = null; - // - // public BukkitCommandWrap getBukkitCommandWrap() { - // return this.bukkitCommandWrap; - // } - @Override public void onEnable() { @@ -50,23 +45,9 @@ public final class Main extends JavaPlugin { plugin = this; autor = plugin.getDescription().getAuthors(); version = plugin.getDescription().getVersion(); - if (!Bukkit.getPluginManager().isPluginEnabled("T2CodeLib")) { - getLogger().severe("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); - getLogger().severe("+ T2CodeLib ist nicht im plugins Ordner, +"); - getLogger().severe("+ daher wurde es aus der eigenen Library geladen! +"); - getLogger().severe("+ Es wird empfohlen die T2CodeLib als eigenes Plugin zu laden, +"); - getLogger().severe("+ um keine Komplikationen mit anderen Plugins von T2Code zu bekommen! +"); - getLogger().severe("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); - new T2CodeLibMain().onEnable(); - } - // if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return; todo - // try { - // Class.forName("com.mojang.brigadier.CommandDispatcher"); - // this.bukkitCommandWrap = new BukkitCommandWrap(); - // } catch (ClassNotFoundException | NoClassDefFoundError e) { - // this.bukkitCommandWrap = new BukkitCommandWrap_Useless(); - // } + if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return; + if (T2CmcVersion.isMc1_13()) { guiCode = ""; } else guiCode = "§6§8§9§r";