diff --git a/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java b/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java index cea9016..af87e55 100644 --- a/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java +++ b/src/main/java/net/t2code/lib/Spigot/Lib/update/UpdateAPI.java @@ -74,27 +74,29 @@ public class UpdateAPI { send.console("§4=========== " + Prefix + " §4==========="); } - public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String pluginVersion, String publicVersion, Player player) { + public static void sendUpdateMsg(String prefix, String Spigot, String Discord, String pluginVersion, String publicVersion, Player player) { if (publicVersion.equals("§4No public version found!")) { return; } - send.player(player, Prefix); + String st = "[prefix]
" + + "You can download it here: [link]'>[prefix] A new [value]version was found!
" + + "You can download it here: [link]'>[prefix] [plv] -> [puv]
" + + "[dc]'>[prefix] You can find more information on Discord.
" + + "[prefix]"; + String value = ""; if (publicVersion.toLowerCase().contains("dev") || publicVersion.toLowerCase().contains("beta") || publicVersion.toLowerCase().contains("snapshot")) { if (publicVersion.toLowerCase().contains("dev")) { - HoverModule.modulePlayer(Prefix + " §6A new §4DEV§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player); + value = "DEV "; } if (publicVersion.toLowerCase().contains("beta")) { - HoverModule.modulePlayer(Prefix + " §6A new §2BETA§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player); + value = "BETA "; } if (publicVersion.toLowerCase().contains("snapshot")) { - HoverModule.modulePlayer(Prefix + " §6A new §eSNAPSHOT§6 version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player); + value = "SNAPSHOT "; } - } else { - HoverModule.modulePlayer(Prefix + " §6A new version was found!", "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player); } - HoverModule.modulePlayer(Prefix + " §c" + pluginVersion + " §7-> §a" + publicVersion, "§6You can download it here: §e" + Spigot, "OPEN_URL", Spigot, player); - HoverModule.modulePlayer(Prefix + " §6You can find more information on Discord.", "§e" + Discord, "OPEN_URL", Discord, player); - send.player(player, Prefix); + send.player(player, st.replace("[prefix]", prefix).replace("[value]", value).replace("[link]", Spigot) + .replace("[plv]",pluginVersion).replace("[puv]",publicVersion).replace("[dc]",Discord)); } private static Boolean noUpdate = true;