Skip to content

Commit

Permalink
Quick Fix Updater
Browse files Browse the repository at this point in the history
  • Loading branch information
ChagnonSebastien committed Jun 27, 2016
1 parent 46fe075 commit 4e4c8bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Bukkit/plugin.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions Bukkit/src/me/poutineqc/cuberunner/CubeRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Bukkit/src/me/poutineqc/cuberunner/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4e4c8bf

Please sign in to comment.