mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Nah. Revert that
This commit is contained in:
parent
3b57326d3b
commit
84572a1cb2
@ -39,19 +39,16 @@ public class DisguiseListener implements Listener {
|
||||
try {
|
||||
UpdateChecker updateChecker = new UpdateChecker();
|
||||
updateChecker.checkUpdate("v" + currentVersion);
|
||||
String lastVersion = latestVersion;
|
||||
latestVersion = updateChecker.getLatestVersion();
|
||||
if (latestVersion != null) {
|
||||
latestVersion = "v" + latestVersion;
|
||||
if (lastVersion == null || !lastVersion.equals(latestVersion)) {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
if (p.hasPermission(permission))
|
||||
p.sendMessage(String.format(updateMessage, currentVersion, latestVersion));
|
||||
}
|
||||
});
|
||||
}
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||
public void run() {
|
||||
for (Player p : Bukkit.getOnlinePlayers())
|
||||
if (p.hasPermission(permission))
|
||||
p.sendMessage(String.format(updateMessage, currentVersion, latestVersion));
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
System.out.print(String.format("[LibsDisguises] Failed to check for update: %s", ex.getMessage()));
|
||||
|
Loading…
Reference in New Issue
Block a user