mirror of
https://github.com/MilkBowl/Vault.git
synced 2024-11-23 19:16:31 +01:00
fix not setting p3 plugin properly for chat support when the plugin is
loaded later on.
This commit is contained in:
parent
4e93a060e6
commit
958a8c102f
@ -48,10 +48,11 @@ public class Chat_Permissions3 extends Chat {
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onPluginEnable(PluginEnableEvent event) {
|
||||
if (chat == null) {
|
||||
Plugin perms = event.getPlugin();
|
||||
if(perms.getDescription().getName().equals("Permissions") && perms.getDescription().getVersion().startsWith("3")) {
|
||||
if (perms.isEnabled()) {
|
||||
chat = (Permissions) perms;
|
||||
Plugin permChat = event.getPlugin();
|
||||
if(permChat.getDescription().getName().equals("Permissions") && permChat.getDescription().getVersion().startsWith("3")) {
|
||||
if (permChat.isEnabled()) {
|
||||
chat = (Permissions) permChat;
|
||||
perms = chat.getHandler();
|
||||
log.info(String.format("[%s][Permission] %s hooked.", plugin.getDescription().getName(), name));
|
||||
}
|
||||
}
|
||||
@ -63,6 +64,7 @@ public class Chat_Permissions3 extends Chat {
|
||||
if (chat != null) {
|
||||
if (event.getPlugin().getDescription().getName().equals("Permissions")) {
|
||||
chat = null;
|
||||
perms = null;
|
||||
log.info(String.format("[%s][Permission] %s un-hooked.", plugin.getDescription().getName(), name));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user