public class PermissionServerListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginEnable(PluginEnableEvent event) {
if (chat == null) {
Plugin permChat = event.getPlugin();
if((permChat.getDescription().getName().equals("Permissions") || permChat.getDescription().getName().equals("vPerms")) && permChat.getDescription().getVersion().startsWith("3")) {
if (permChat.isEnabled()) {
chat = (Permissions) permChat;
perms = chat.getHandler();
log.info(String.format("[%s][Chat] %s hooked.", plugin.getDescription().getName(), name));
}
}