// Path: src/net/diecode/killermoney/enums/KMPermission.java
// public enum KMPermission {
// 
//     ADMIN("admin"),
//     MONEY_MULTIPLIER("money.multiplier"),
// 
//     LIMIT_MONEY_MULTIPLIER("moneylimit.multiplier"),
//     //LIMIT_ITEM_MULTIPLIER("itemlimit.multiplier"),
//     //LIMIT_COMMAND_MULTIPLIER("commandlimit.multiplier"),
// 
//     BYPASS_MONEY_LIMIT("bypass.moneylimit"),
//     BYPASS_ITEM_LIMIT("bypass.itemlimit"),
//     BYPASS_COMMAND_LIMIT("bypass.commandlimit"),
//     BYPASS_MONEY_LIMIT_CASH_TRANSFER("bypass.cashtransferlimit");
// 
//     private String perm;
// 
//     KMPermission(String perm) {
//         this.perm = perm;
//     }
// 
//     public String get() {
//         return "km." + perm;
//     }
// 
// }


import net.diecode.killermoney.enums.KMPermission;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
                // Get the version's link
                String versionLink = (String) latest.get(API_LINK_VALUE);

                // Get the version's release type
                String versionType = (String) latest.get(API_RELEASE_TYPE_VALUE);

                // Get the version's file name
                String versionFileName = (String) latest.get(API_FILE_NAME_VALUE);

                // Get the version's game version
                String versionGameVersion = (String) latest.get(API_GAME_VERSION_VALUE);

                newestVersion = versionName.replaceAll("[^\\d.]", "");

                Bukkit.getScheduler().scheduleSyncDelayedTask(BukkitMain.getInstance(), new Runnable() {
                    @Override
                    public void run() {
                        try {
                            if (isNewest(newestVersion)) {
                                updateAvailable = true;

                                Logger.info("------------------------------");
                                Logger.info("| Update found!");
                                Logger.info("| Your version: " +
                                        BukkitMain.getInstance().getDescription().getVersion() +
                                        " | " + "New version: " + newestVersion);
                                Logger.info("| " + BukkitMain.getInstance().getDescription().getWebsite());
                                Logger.info("------------------------------");

                                for (Player player : Bukkit.getOnlinePlayers()) {
// Path: src/net/diecode/killermoney/enums/KMPermission.java
// public enum KMPermission {
// 
//     ADMIN("admin"),
//     MONEY_MULTIPLIER("money.multiplier"),
// 
//     LIMIT_MONEY_MULTIPLIER("moneylimit.multiplier"),
//     //LIMIT_ITEM_MULTIPLIER("itemlimit.multiplier"),
//     //LIMIT_COMMAND_MULTIPLIER("commandlimit.multiplier"),
// 
//     BYPASS_MONEY_LIMIT("bypass.moneylimit"),
//     BYPASS_ITEM_LIMIT("bypass.itemlimit"),
//     BYPASS_COMMAND_LIMIT("bypass.commandlimit"),
//     BYPASS_MONEY_LIMIT_CASH_TRANSFER("bypass.cashtransferlimit");
// 
//     private String perm;
// 
//     KMPermission(String perm) {
//         this.perm = perm;
//     }
// 
//     public String get() {
//         return "km." + perm;
//     }
// 
// }


// Path: src/net/diecode/killermoney/Updater.java
import net.diecode.killermoney.enums.KMPermission;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

                // Get the version's link
                String versionLink = (String) latest.get(API_LINK_VALUE);

                // Get the version's release type
                String versionType = (String) latest.get(API_RELEASE_TYPE_VALUE);

                // Get the version's file name
                String versionFileName = (String) latest.get(API_FILE_NAME_VALUE);

                // Get the version's game version
                String versionGameVersion = (String) latest.get(API_GAME_VERSION_VALUE);

                newestVersion = versionName.replaceAll("[^\\d.]", "");

                Bukkit.getScheduler().scheduleSyncDelayedTask(BukkitMain.getInstance(), new Runnable() {
                    @Override
                    public void run() {
                        try {
                            if (isNewest(newestVersion)) {
                                updateAvailable = true;

                                Logger.info("------------------------------");
                                Logger.info("| Update found!");
                                Logger.info("| Your version: " +
                                        BukkitMain.getInstance().getDescription().getVersion() +
                                        " | " + "New version: " + newestVersion);
                                Logger.info("| " + BukkitMain.getInstance().getDescription().getWebsite());
                                Logger.info("------------------------------");

                                for (Player player : Bukkit.getOnlinePlayers()) {
                                    if (player.isOp() || player.hasPermission(KMPermission.ADMIN.get())) {