diff --git a/Bukkit/plugin.yml b/Bukkit/plugin.yml index a91a995..3915b4c 100644 --- a/Bukkit/plugin.yml +++ b/Bukkit/plugin.yml @@ -1,6 +1,6 @@ name: CubeRunner main : me.poutineqc.cuberunner.CubeRunner -version: 2.5 +version: 2.5.1 description: Blocks are falling over your head! Can you outrun them? load: postworld author: PoutineQc diff --git a/Bukkit/src/me/poutineqc/cuberunner/CubeRunner.java b/Bukkit/src/me/poutineqc/cuberunner/CubeRunner.java index 94a48e3..87926cd 100644 --- a/Bukkit/src/me/poutineqc/cuberunner/CubeRunner.java +++ b/Bukkit/src/me/poutineqc/cuberunner/CubeRunner.java @@ -52,8 +52,10 @@ public void onEnable() { aboveOneNine = NMS_VERSION.startsWith("v1_9") || NMS_VERSION.startsWith("v1_1") || NMS_VERSION.startsWith("v2"); config = new Configuration(this); - if (config.lookForUpdates) + if (config.lookForUpdates) { updater = new Updater(this); + getServer().getPluginManager().registerEvents(updater, this); + } if (!initialiseEconomy()) return; @@ -181,7 +183,6 @@ public Economy getEconomy() { private void enableListeners() { PluginManager pm = getServer().getPluginManager(); - pm.registerEvents(updater, this); pm.registerEvents(playerData, this); pm.registerEvents(new ListenerPlayerDamage(), this); pm.registerEvents(new ListenerPlayerTeleport(), this); diff --git a/Bukkit/src/me/poutineqc/cuberunner/Updater.java b/Bukkit/src/me/poutineqc/cuberunner/Updater.java index 87a69dd..8b1bd48 100644 --- a/Bukkit/src/me/poutineqc/cuberunner/Updater.java +++ b/Bukkit/src/me/poutineqc/cuberunner/Updater.java @@ -59,7 +59,7 @@ private void checkForLastVersion(CubeRunner plugin) { } private boolean getInfoFromServer() throws IOException { - URL oracle = new URL(spigotPage); + URL oracle = new URL(spigotPage + "history"); URLConnection urlConn = oracle.openConnection(); urlConn.addRequestProperty("User-Agent", "Mozilla/4.76"); InputStream is = urlConn.getInputStream();