diff --git a/pom.xml b/pom.xml index b56ed5c..fe04bd5 100644 --- a/pom.xml +++ b/pom.xml @@ -56,13 +56,13 @@ org.dynmap dynmap-api - [0.29,) + [0.32,) compile org.bukkit bukkit - [1.0.1-R1-SNAPSHOT,) + 1.1-R5-SNAPSHOT compile diff --git a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java index a594d2c..6ba9d61 100644 --- a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java +++ b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java @@ -16,10 +16,9 @@ import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.event.Event.Priority; -import org.bukkit.event.Event.Type; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; import org.bukkit.event.server.PluginEnableEvent; -import org.bukkit.event.server.ServerListener; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.PluginManager; @@ -466,8 +465,9 @@ public class DynmapFactionsPlugin extends JavaPlugin { } - private class OurServerListener extends ServerListener { - @Override + private class OurServerListener implements Listener { + @SuppressWarnings("unused") + @EventHandler public void onPluginEnable(PluginEnableEvent event) { Plugin p = event.getPlugin(); String name = p.getDescription().getName(); @@ -495,12 +495,12 @@ public class DynmapFactionsPlugin extends JavaPlugin { return; } factions = p; - + + getServer().getPluginManager().registerEvents(new OurServerListener(), this); + /* If both enabled, activate */ if(dynmap.isEnabled() && factions.isEnabled()) activate(); - else - getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE, new OurServerListener(), Priority.Monitor, this); } private void activate() { @@ -548,11 +548,11 @@ public class DynmapFactionsPlugin extends JavaPlugin { cusstyle.put(id, new AreaStyle(cfg, "custstyle." + id, defstyle)); } } - List vis = cfg.getList("visibleregions"); + List vis = cfg.getStringList("visibleregions"); if(vis != null) { visible = new HashSet(vis); } - List hid = cfg.getList("hiddenregions"); + List hid = cfg.getStringList("hiddenregions"); if(hid != null) { hidden = new HashSet(hid); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 71ee349..c53cada 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,5 +2,5 @@ name: Dynmap-Factions main: org.dynmap.factions.DynmapFactionsPlugin version: "${project.version}" author: mikeprimm -softdepend: [dynmap,Factions] +depend: [ dynmap, Factions ]