From 65e0082322643a7d53cbf3f47c19058da9bcbc72 Mon Sep 17 00:00:00 2001 From: JaTiTV Date: Thu, 7 Dec 2023 16:58:39 +0100 Subject: [PATCH] 16.1 --- .idea/misc.xml | 2 ++ pom.xml | 8 ++++---- .../BUNGEE/system/pluginMessaging/T2CplmsgBcmd.java | 9 ++++++++- .../t2codelib/SPIGOT/api/update/T2CupdateCheckerGit.java | 6 +++++- .../t2codelib/SPIGOT/system/cmd/CreateReportLog.java | 4 ++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 2cefd2b..d0aa95e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,3 +1,4 @@ + @@ -12,6 +13,7 @@ + \ No newline at end of file diff --git a/pom.xml b/pom.xml index fc90667..61c0d38 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.t2code T2CodeLib - 15.9 + 16.1 @@ -118,7 +118,7 @@ org.spigotmc spigot-api - 1.20-R0.1-SNAPSHOT + 1.20.2-R0.1-SNAPSHOT provided @@ -188,13 +188,13 @@ net.kyori adventure-platform-bukkit - 4.3.0 + 4.3.1 compile net.kyori adventure-platform-bungeecord - 4.3.0 + 4.3.1 compile diff --git a/src/main/java/net/t2code/t2codelib/BUNGEE/system/pluginMessaging/T2CplmsgBcmd.java b/src/main/java/net/t2code/t2codelib/BUNGEE/system/pluginMessaging/T2CplmsgBcmd.java index 29a6867..2b7970e 100644 --- a/src/main/java/net/t2code/t2codelib/BUNGEE/system/pluginMessaging/T2CplmsgBcmd.java +++ b/src/main/java/net/t2code/t2codelib/BUNGEE/system/pluginMessaging/T2CplmsgBcmd.java @@ -6,6 +6,7 @@ import net.md_5.bungee.api.event.PluginMessageEvent; import net.md_5.bungee.api.plugin.Listener; import net.md_5.bungee.event.EventHandler; import net.t2code.t2codelib.Util; +import org.junit.Ignore; import java.io.ByteArrayInputStream; import java.io.DataInputStream; @@ -20,7 +21,13 @@ public class T2CplmsgBcmd implements Listener { try { String channel = stream.readUTF(); String input = stream.readUTF(); - String serverID = stream.readUTF(); + String serverID; + try { + serverID = stream.readUTF(); + } catch (Exception i){ + serverID = "not Found"; + } + if (channel.equals("T2Code-Console")) { ProxyServer.getInstance().getConsole().sendMessage(Util.getPrefix()+" [§6"+serverID+"§r] §cT2C BCMD Command Console: §r"+ input); ProxyServer.getInstance().getPluginManager().dispatchCommand(ProxyServer.getInstance().getConsole(), input); diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateCheckerGit.java b/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateCheckerGit.java index 25b8291..5454092 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateCheckerGit.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/api/update/T2CupdateCheckerGit.java @@ -53,6 +53,10 @@ public class T2CupdateCheckerGit { ); T2CupdateAPI.pluginVersions.put(plugin.getName(), update); + if (T2CupdateAPI.pluginVersions.get(plugin.getName()) == null){ + T2Csend.debugmsg(T2CodeLibMain.getPlugin(),plugin.getName() + " UpdateAPI T2CupdateAPI.pluginVersions.get(plugin.getName()) == null"); + return; + } if (T2CupdateAPI.pluginVersions.get(plugin.getName()).updateAvailable) { if (!update.load) { new BukkitRunnable() { @@ -74,7 +78,7 @@ public class T2CupdateCheckerGit { }, plugin.getDescription().getVersion(), spigotID, finalRepoURL, updateCheckOnJoin, seePreReleaseUpdates, timeInterval); } - }, 0L, finalInterval * 60 * 20L); + }, 10L, finalInterval * 60 * 20L); } public void getVersion(Consumer consumer, String pluginVersion, Integer spigotID, String URL, Boolean updateCheckOnJoin, Boolean seePreReleaseUpdates, Integer timeInterval) { diff --git a/src/main/java/net/t2code/t2codelib/SPIGOT/system/cmd/CreateReportLog.java b/src/main/java/net/t2code/t2codelib/SPIGOT/system/cmd/CreateReportLog.java index 76f92a0..44c4d05 100644 --- a/src/main/java/net/t2code/t2codelib/SPIGOT/system/cmd/CreateReportLog.java +++ b/src/main/java/net/t2code/t2codelib/SPIGOT/system/cmd/CreateReportLog.java @@ -198,7 +198,7 @@ public class CreateReportLog { "
[prefix] You can download it Download the debug file'>here." + "
[prefix] Please enter the following key in the ticket: Copy to clipboard'>[key]" + "
[prefix] Do not share the download URL with anyone!" + - "
Click to delete'>[prefix] You can delte yor Debug-File by clicking me." + + "
[prefix] Click to delete'>You can delete your Debug-File by clicking me." + "
[prefix] (If you do not delete the debug file, it will be deleted automatically after 14 days!)") .replace("[key]", fileID).replace("[url]", downloadURL).replace("[prefix]", Util.getPrefix())); } @@ -206,7 +206,7 @@ public class CreateReportLog { "
Please enter the following key in the ticket: [key]." + "
Do not share the download URL with anyone!" + "
(If you do not delete the debug file, it will be deleted automatically after 14 days!)" + - "
You can delte yor Debug-File with the following command: /t2code debug deleteReportLog [key].") + "
You can delete your Debug-File with the following command: /t2code debug deleteReportLog [key].") .replace("[key]", fileID).replace("[url]", downloadURL)); ReportLogStorage.add(fileID); }