summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me/essentials
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 20:56:29 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 20:56:29 +0000
commit541fc517808729ff5cd15b4c4dd688cc9cfc482b (patch)
treeb4cfb69122015fbf45411d43f1bca28b66e0705b /EssentialsProtect/src/com/earth2me/essentials
parentaef2dd35d6d574d4154cf283bb16f1d5bc38156b (diff)
downloadEssentials-541fc517808729ff5cd15b4c4dd688cc9cfc482b.tar
Essentials-541fc517808729ff5cd15b4c4dd688cc9cfc482b.tar.gz
Essentials-541fc517808729ff5cd15b4c4dd688cc9cfc482b.tar.lz
Essentials-541fc517808729ff5cd15b4c4dd688cc9cfc482b.tar.xz
Essentials-541fc517808729ff5cd15b4c4dd688cc9cfc482b.zip
[trunk] Protect, merging changes in
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1581 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index 7a7772ea6..8dc8ebd10 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -12,6 +12,8 @@ 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;
import java.util.logging.Logger;
import org.bukkit.Location;
@@ -30,16 +32,16 @@ public class EssentialsProtect extends JavaPlugin implements IConf
private EssentialsProtectWeatherListener weatherListener = null;
public static final String AUTHORS = Essentials.AUTHORS;
private static final Logger logger = Logger.getLogger("Minecraft");
- public static HashMap<String, Boolean> genSettings = null;
- public static HashMap<String, String> dataSettings = null;
- public static HashMap<String, Boolean> guardSettings = null;
- public static HashMap<String, Boolean> playerSettings = null;
- public static ArrayList usageList = null;
- public static ArrayList blackListPlace = null;
- public static ArrayList breakBlackList = null;
- public static ArrayList onPlaceAlert = null;
- public static ArrayList onUseAlert = null;
- public static ArrayList onBreakAlert = null;
+ public static Map<String, Boolean> genSettings = null;
+ public static Map<String, String> dataSettings = null;
+ public static Map<String, Boolean> guardSettings = null;
+ public static Map<String, Boolean> playerSettings = null;
+ public static List<Integer> usageList = null;
+ public static List<Integer> blackListPlace = null;
+ public static List<Integer> breakBlackList = null;
+ public static List<Integer> onPlaceAlert = null;
+ public static List<Integer> onUseAlert = null;
+ public static List<Integer> onBreakAlert = null;
private IProtectedBlock storage = null;
IEssentials ess = null;
private static EssentialsProtect instance = null;
@@ -54,8 +56,6 @@ public class EssentialsProtect extends JavaPlugin implements IConf
PluginManager pm = this.getServer().getPluginManager();
ess = Essentials.getStatic();
ess.getDependancyChecker().checkProtectDependancies();
- instance = this;
- reloadConfig();
playerListener = new EssentialsProtectPlayerListener(this);
blockListener = new EssentialsProtectBlockListener(this);
@@ -77,13 +77,15 @@ public class EssentialsProtect extends JavaPlugin implements IConf
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.info("Loaded " + this.getDescription().getName() + " build " + this.getDescription().getVersion() + " maintained by " + AUTHORS);
+ logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}
- public static boolean checkProtectionItems(ArrayList itemList, int id)
+ public static boolean checkProtectionItems(List<Integer> itemList, int id)
{
- return !itemList.isEmpty() && itemList.contains(String.valueOf(id));
+ return !itemList.isEmpty() && itemList.contains(id);
}
@Override