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
This commit is contained in:
2022-12-22 01:43:40 +01:00
parent deeedcd408
commit eb7fd03650
6 changed files with 17 additions and 12 deletions

View File

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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());

View File

@@ -24,6 +24,7 @@ public class T2CupdateAPI {
join(plugin,prefix,perm,player,spigotID,discord);
}
},2*20L);
return;
}
if (!pluginVersions.get(plugin.getName()).updateCheckOnJoin) {

View File

@@ -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<String> autor;
private static String version;
@Getter
private static Boolean mmIsLoad = true;
private static Boolean load = false;