mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +00:00
Reload TownyChat if we detect craftIRC perform a reload (no more
unregistered tags after reloading craftIRC).
This commit is contained in:
1 parent
ab3674345d
commit
436520a183
4 files changed
+41
-7
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user