summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 21:03:08 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 21:03:08 +0000
commit8bad78402afec1a5017f8e1ef76591e48b0ce3d7 (patch)
tree78590178d3bb403315632c017dd1f39aacb488ec /EssentialsProtect/src/com/earth2me
parent9734dd4d27f9584e75ffd6c9429f51bd8971cd40 (diff)
downloadEssentials-8bad78402afec1a5017f8e1ef76591e48b0ce3d7.tar
Essentials-8bad78402afec1a5017f8e1ef76591e48b0ce3d7.tar.gz
Essentials-8bad78402afec1a5017f8e1ef76591e48b0ce3d7.tar.lz
Essentials-8bad78402afec1a5017f8e1ef76591e48b0ce3d7.tar.xz
Essentials-8bad78402afec1a5017f8e1ef76591e48b0ce3d7.zip
[trunk] Protect, move some bits about
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1582 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index 8dc8ebd10..b3daf4e0b 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -10,8 +10,6 @@ import com.earth2me.essentials.protect.data.ProtectedBlockMemory;
import com.earth2me.essentials.protect.data.ProtectedBlockMySQL;
import com.earth2me.essentials.protect.data.ProtectedBlockSQLite;
import java.beans.PropertyVetoException;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
@@ -53,10 +51,10 @@ public class EssentialsProtect extends JavaPlugin implements IConf
public void onEnable()
{
- PluginManager pm = this.getServer().getPluginManager();
+
ess = Essentials.getStatic();
ess.getDependancyChecker().checkProtectDependancies();
-
+ PluginManager pm = this.getServer().getPluginManager();
playerListener = new EssentialsProtectPlayerListener(this);
blockListener = new EssentialsProtectBlockListener(this);
entityListener = new EssentialsProtectEntityListener(this);
@@ -73,12 +71,11 @@ public class EssentialsProtect extends JavaPlugin implements IConf
pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
-
+ reloadConfig();
+ ess.addReloadListener(this);
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
{
- logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version.");
- reloadConfig();
- Essentials.getStatic().addReloadListener(this);
+ logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}