From 9f76acbc17a38e323376c4e8ac3e235c38cc08c8 Mon Sep 17 00:00:00 2001 From: Steven Scott Date: Sun, 5 Feb 2012 12:36:40 -0800 Subject: [PATCH] [Version 0.7.5.2] - Make sure our timer is stopped on disable - Move Event reg before loading gates to stop portal material vanishing --- README | 3 +++ src/net/TheDgtl/Stargate/Stargate.java | 18 ++++++++++-------- src/plugin.yml | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/README b/README index c249604..2240dc5 100644 --- a/README +++ b/README @@ -201,6 +201,9 @@ createConflict=Gate conflicts with existing gate ============= Changes ============= +[Version 0.7.5.2] + - Make sure our timer is stopped on disable + - Move Event reg before loading gates to stop portal material vanishing [Version 0.7.5.1] - Don't create button on failed creation [Version 0.7.5.0] diff --git a/src/net/TheDgtl/Stargate/Stargate.java b/src/net/TheDgtl/Stargate/Stargate.java index f01a2b4..7977aab 100644 --- a/src/net/TheDgtl/Stargate/Stargate.java +++ b/src/net/TheDgtl/Stargate/Stargate.java @@ -89,6 +89,7 @@ public class Stargate extends JavaPlugin { public void onDisable() { Portal.closeAllGates(); Portal.clearGates(); + getServer().getScheduler().cancelTasks(this); } public void onEnable() { @@ -106,6 +107,15 @@ public class Stargate extends JavaPlugin { log.info(pdfFile.getName() + " v." + pdfFile.getVersion() + " is enabled."); + // Register events before loading gates to stop weird things happening. + pm.registerEvents(new pListener(), this); + pm.registerEvents(new bListener(), this); + + pm.registerEvents(new vListener(), this); + pm.registerEvents(new eListener(), this); + pm.registerEvents(new wListener(), this); + pm.registerEvents(new sListener(), this); + this.loadConfig(); this.migrate(); this.reloadGates(); @@ -124,14 +134,6 @@ public class Stargate extends JavaPlugin { log.info("[Stargate] Vault v" + iConomyHandler.vault.getDescription().getVersion() + " found"); } - pm.registerEvents(new pListener(), this); - pm.registerEvents(new bListener(), this); - - pm.registerEvents(new vListener(), this); - pm.registerEvents(new eListener(), this); - pm.registerEvents(new wListener(), this); - pm.registerEvents(new sListener(), this); - getServer().getScheduler().scheduleSyncRepeatingTask(this, new SGThread(), 0L, 100L); } diff --git a/src/plugin.yml b/src/plugin.yml index d064e72..ab43d98 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.7.5.1 +version: 0.7.5.2 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net