Reload TownyChat if we detect craftIRC perform a reload (no more

unregistered tags after reloading craftIRC).
This commit is contained in:
ElgarL committed 2012-04-21 03:02:37 +01:00
1 parent ab3674345d
commit 436520a183
4 files changed
+41 -7

No files matched your search

+12 -1
View File
@@ -95,7 +95,18 @@ public class Chat extends JavaPlugin {
configuration = null;
channels = null;
}
/**
* Perform a reload of this plugin.
*/
public void reload() {
onDisable();
onEnable();
}
/**
* Attempt to hook any plugins we want to access.
*/
private void checkPlugins() {
Plugin test;
@@ -110,7 +121,7 @@ public class Chat extends JavaPlugin {
try {
if (Double.valueOf(test.getDescription().getVersion()) >= 3.1) {
craftIRC = (CraftIRC) test;
irc = new CraftIRCHandler(craftIRC, "towny");
irc = new CraftIRCHandler(this, craftIRC, "towny");
} else
getLogger().warning("TownyChat requires CraftIRC version 3.1 or higher to relay chat.");
} catch (NumberFormatException e) {