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

16
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>13.6</version>
<version>13.9</version>
<packaging>jar</packaging>
<name>T2CodeLib</name>
@ -106,7 +106,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.2-R0.1-SNAPSHOT</version>
<version>1.19.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!-- repo.t2code / T2Code -->
@ -133,33 +133,33 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.1</version>
<version>2.11.2</version>
<scope>provided</scope>
</dependency>
<!-- votingplugin -->
<dependency>
<groupId>com.bencodez</groupId>
<artifactId>votingplugin</artifactId>
<version>LATEST</version>
<version>6.10.0</version>
<scope>provided</scope>
</dependency>
<!--Kyori MiniMessage-->
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-text-minimessage</artifactId>
<version>4.11.0</version>
<version>4.12.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId>
<version>4.1.2</version>
<version>4.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.kyori</groupId>
<artifactId>adventure-platform-bungeecord</artifactId>
<version>4.1.2</version>
<version>4.2.0</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
@ -180,7 +180,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
<scope>compile</scope>
</dependency>
</dependencies>

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;