Update UpdateAPI.java
This commit is contained in:
parent
a84b185812
commit
7f706cce49
@ -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]<br>" +
|
||||
"<click:open_url:'[link]'><hover:show_text:'<gold>You can download it here: <yellow>[link]</yellow></gold>'>[prefix] <gold>A new</gold> [value]<gold>version was found!</gold></hover></click><br>" +
|
||||
"<click:open_url:'[link]'><hover:show_text:'<gold>You can download it here: <yellow>[link]</yellow></gold>'>[prefix] <red>[plv]</red> <gray>-></gray> <green>[puv]</green></hover></click><br>" +
|
||||
"<click:open_url:'[dc]'><hover:show_text:'<yellow>[dc]</yellow>'>[prefix] <gold>You can find more information on Discord.</gold></hover></click><br>" +
|
||||
"[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 = "<dark_red>DEV </dark_red>";
|
||||
}
|
||||
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 = "<green>BETA </green>";
|
||||
}
|
||||
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 = "<yellow>SNAPSHOT </yellow>";
|
||||
}
|
||||
} 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;
|
||||
|
Loading…
Reference in New Issue
Block a user