Nah. Revert that

This commit is contained in:
Andrew 2013-11-07 03:57:56 +13:00
parent 3b57326d3b
commit 84572a1cb2

View File

@ -39,19 +39,16 @@ public class DisguiseListener implements Listener {
try { try {
UpdateChecker updateChecker = new UpdateChecker(); UpdateChecker updateChecker = new UpdateChecker();
updateChecker.checkUpdate("v" + currentVersion); updateChecker.checkUpdate("v" + currentVersion);
String lastVersion = latestVersion;
latestVersion = updateChecker.getLatestVersion(); latestVersion = updateChecker.getLatestVersion();
if (latestVersion != null) { if (latestVersion != null) {
latestVersion = "v" + latestVersion; latestVersion = "v" + latestVersion;
if (lastVersion == null || !lastVersion.equals(latestVersion)) { Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { public void run() {
public void run() { for (Player p : Bukkit.getOnlinePlayers())
for (Player p : Bukkit.getOnlinePlayers()) if (p.hasPermission(permission))
if (p.hasPermission(permission)) p.sendMessage(String.format(updateMessage, currentVersion, latestVersion));
p.sendMessage(String.format(updateMessage, currentVersion, latestVersion)); }
} });
});
}
} }
} catch (Exception ex) { } catch (Exception ex) {
System.out.print(String.format("[LibsDisguises] Failed to check for update: %s", ex.getMessage())); System.out.print(String.format("[LibsDisguises] Failed to check for update: %s", ex.getMessage()));