From eb7fd036508becf17615eeab187db5e67c608d03 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Thu, 22 Dec 2022 01:43:40 +0100 Subject: [PATCH] 13.9 Bugfix: - The plugin messaging channel for T2C-Commendgui was not properly registered on the proxy - Fixed a small bug in the Update Checker where a NullPointExeption appeared in the console when the UpdateCheck server was unreachable --- pom.xml | 16 ++++++++-------- .../t2codelib/BUNGEE/api/messages/T2CBsend.java | 6 +++--- .../t2code/t2codelib/BUNGEE/system/T2CBload.java | 2 +- .../t2codelib/BUNGEE/system/T2CodeBMain.java | 2 ++ .../SPIGOT/api/update/T2CupdateAPI.java | 1 + .../t2codelib/SPIGOT/system/T2CodeLibMain.java | 2 ++ 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 4ef502f..8f8f9ef 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.t2code T2CodeLib - 13.6 + 13.9 jar T2CodeLib @@ -106,7 +106,7 @@ org.spigotmc spigot-api - 1.19.2-R0.1-SNAPSHOT + 1.19.3-R0.1-SNAPSHOT provided @@ -133,33 +133,33 @@ me.clip placeholderapi - 2.11.1 + 2.11.2 provided com.bencodez votingplugin - LATEST + 6.10.0 provided net.kyori adventure-text-minimessage - 4.11.0 + 4.12.0 compile net.kyori adventure-platform-bukkit - 4.1.2 + 4.2.0 compile net.kyori adventure-platform-bungeecord - 4.1.2 + 4.2.0 compile @@ -180,7 +180,7 @@ org.apache.httpcomponents httpmime - 4.5.13 + 4.5.14 compile diff --git a/src/main/java/net/t2code/t2codelib/BUNGEE/api/messages/T2CBsend.java b/src/main/java/net/t2code/t2codelib/BUNGEE/api/messages/T2CBsend.java index a43c87d..f497c1e 100644 --- a/src/main/java/net/t2code/t2codelib/BUNGEE/api/messages/T2CBsend.java +++ b/src/main/java/net/t2code/t2codelib/BUNGEE/api/messages/T2CBsend.java @@ -11,13 +11,13 @@ import java.util.logging.Level; public class T2CBsend { public static void console(String msg) { - if (T2CodeBMain.getMmIsLoad()) { + if (T2CodeBMain.getMmIsLoad() && T2CodeBMain.getMmIsLoad()) { T2CBminiMessage.sendConsoleMiniMessage(msg); } else ProxyServer.getInstance().getConsole().sendMessage(msg); } public static void player(ProxiedPlayer player, String msg) { - if (T2CodeBMain.getMmIsLoad()) { + if (T2CodeBMain.getMmIsLoad()&& T2CodeBMain.getMmIsLoad()) { T2CBminiMessage.sendPlayerMiniMessage(msg, player); } else player.sendMessage(msg); } @@ -27,7 +27,7 @@ public class T2CBsend { } public static void sender(CommandSender sender, String msg) { - if (T2CodeBMain.getMmIsLoad()) { + if (T2CodeBMain.getMmIsLoad()&& T2CodeBMain.getMmIsLoad()) { T2CBminiMessage.sendSenderMiniMessage(msg, sender); } else sender.sendMessage(msg); } diff --git a/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CBload.java b/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CBload.java index f3398e7..233828d 100644 --- a/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CBload.java +++ b/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CBload.java @@ -40,7 +40,7 @@ public class T2CBload { plugin.getProxy().getPluginManager().registerListener(plugin, new T2CplmsgBcmd()); if (T2CBlibConfig.getApiCommandGUIEnable()) { - plugin.getProxy().registerChannel("t2c:cgui"); + plugin.getProxy().registerChannel("t2c:cguiopl"); plugin.getProxy().getPluginManager().registerListener(plugin, new T2CapiCGUI()); T2CapiCGUI.sendToSpigotDeleteAll(); } diff --git a/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CodeBMain.java b/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CodeBMain.java index db5cd3e..0900eae 100644 --- a/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CodeBMain.java +++ b/src/main/java/net/t2code/t2codelib/BUNGEE/system/T2CodeBMain.java @@ -37,7 +37,9 @@ public class T2CodeBMain extends Plugin { autor = plugin.getDescription().getAuthor(); try { adventure = BungeeAudiences.create(this); + T2CBsend.info(this,"Adventure load!"); } catch (Exception e){ + T2CBsend.error(this,"Adventure can not be load!"); mmIsLoad = false; } T2CBload.onLoad(plugin, Util.getPrefix(), autor, orgVersion, Util.getSpigot(), Util.getDiscord(), Util.getSpigotID(), Util.getBstatsID(),Util.getGit()); diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateAPI.java b/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateAPI.java index 9b616e1..b6129b6 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateAPI.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateAPI.java @@ -24,6 +24,7 @@ public class T2CupdateAPI { join(plugin,prefix,perm,player,spigotID,discord); } },2*20L); + return; } if (!pluginVersions.get(plugin.getName()).updateCheckOnJoin) { diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/system/T2CodeLibMain.java b/src/main/java/net/t2code/t2codelib/SPIGOT/system/T2CodeLibMain.java index f2c8054..2776ddd 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/system/T2CodeLibMain.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/system/T2CodeLibMain.java @@ -1,5 +1,6 @@ package net.t2code.t2codelib.SPIGOT.system; +import lombok.Getter; import net.kyori.adventure.platform.bukkit.BukkitAudiences; import net.milkbowl.vault.economy.Economy; import net.milkbowl.vault.permission.Permission; @@ -33,6 +34,7 @@ public final class T2CodeLibMain extends JavaPlugin { private static List autor; private static String version; + @Getter private static Boolean mmIsLoad = true; private static Boolean load = false;