package org.plugins.simplefreeze.util;

public class UpdateNotifier {

}

@@ -37,37 +37,1179 @@
 l;%0A%0A
-public class UpdateNotifier %7B
+import org.bukkit.Bukkit;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.InputStreamReader;%0Aimport java.net.HttpURLConnection;%0Aimport java.net.URL;%0A%0Apublic class UpdateNotifier %7B%0A%0A    public final static String VERSION = %223.0.0%22;%0A%0A    public static String getLatestVersion() %7B%0A        try %7B%0A            HttpURLConnection con = (HttpURLConnection) new URL(%22http://www.spigotmc.org/api/general.php%22).openConnection();%0A            con.setDoOutput(true);%0A            con.setRequestMethod(%22POST%22);%0A            con.getOutputStream().write((%22key=98BE0FE67F88AB82B4C197FAF1DC3B69206EFDCC4D3B80FC83A00037510B99B4&resource=%22 + %2218044%22).getBytes(%22UTF-8%22));%0A            String version = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();%0A%0A            if (version.contains(%22 %22)) %7B%0A                return version.substring(0, version.indexOf(%22 %22));%0A            %7D else %7B%0A                return version;%0A            %7D%0A        %7D catch (Exception ex) %7B%0A            Bukkit.getLogger().info(%22Failed to check for a update on spigot.%22);%0A            return %22%22;%0A        %7D%0A    %7D%0A%0A    public static String getCurrentVersion() %7B%0A        return UpdateNotifier.VERSION;%0A    %7D
 %0A%0A%7D%0A

Set version variable to correct version