mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-20 13:31:33 +01:00
Throw error when invalid version of AdminPrivateChat is detected.
This commit is contained in:
parent
5b631cd60a
commit
7996d0f966
@ -1491,9 +1491,14 @@ public class PurpleIRC extends JavaPlugin {
|
|||||||
hookList.add(hookFormat(PL_FACTIONCHAT, false));
|
hookList.add(hookFormat(PL_FACTIONCHAT, false));
|
||||||
}
|
}
|
||||||
if (isPluginEnabled(PL_ADMINPRIVATECHAT)) {
|
if (isPluginEnabled(PL_ADMINPRIVATECHAT)) {
|
||||||
hookList.add(hookFormat(PL_ADMINPRIVATECHAT, true));
|
if (getServer().getPluginManager().getPlugin(PL_ADMINPRIVATECHAT)
|
||||||
adminPrivateChatHook = new AdminPrivateChatHook(this);
|
.getDescription().getAuthors().contains("cnaude")) {
|
||||||
getServer().getPluginManager().registerEvents(new AdminChatListener(this), this);
|
hookList.add(hookFormat(PL_ADMINPRIVATECHAT, true));
|
||||||
|
adminPrivateChatHook = new AdminPrivateChatHook(this);
|
||||||
|
getServer().getPluginManager().registerEvents(new AdminChatListener(this), this);
|
||||||
|
} else {
|
||||||
|
logError(PL_ADMINPRIVATECHAT + "Version not supported. Please use the latest version from http://jenkins.cnaude.org/job/AdminPrivateChat/");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
hookList.add(hookFormat(PL_ADMINPRIVATECHAT, false));
|
hookList.add(hookFormat(PL_ADMINPRIVATECHAT, false));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user