Cleaned up configuration handling and added new logging class.

This commit is contained in:
FrozenCow 2011-05-18 13:51:27 +02:00
parent e5556d9138
commit e28ee185b6
15 changed files with 354 additions and 120 deletions

View file

@ -11,7 +11,6 @@ import org.bukkit.event.Event;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
import org.bukkit.plugin.Plugin;
import org.bukkit.util.config.Configuration;
public class HeroChatHandler {
protected static final Logger log = Logger.getLogger("Minecraft");
@ -227,13 +226,13 @@ public class HeroChatHandler {
}
}
public HeroChatHandler(Configuration cfg, DynmapPlugin plugin, Server server) {
public HeroChatHandler(ConfigurationNode cfg, DynmapPlugin plugin, Server server) {
/* If we're enabling hero chat support */
if (cfg.getNode("web").getBoolean("enableherochat", false)) {
log.info(LOG_PREFIX + "HeroChat support configured");
this.plugin = plugin;
/* Now, get the monitored channel list */
hcchannels = cfg.getNode("web").getStringList("herochatchannels",
hcchannels = cfg.getStrings("web/herochatchannels",
DEF_CHANNELS);
/* And get channel to send web messages */
hcwebinputchannel = cfg.getNode("web").getString(