mchatSuite listeners still using old mChat info.

This commit is contained in:
Sleaker 2012-07-08 18:48:23 -07:00
parent 67b2af2ed5
commit 23330bfd33
2 changed files with 5 additions and 9 deletions

View File

@ -49,7 +49,7 @@ public class Chat_mChatSuite extends Chat {
// Load Plugin in case it was loaded before
if (mChat == null) {
Plugin chat = plugin.getServer().getPluginManager().getPlugin("mChatSuite");
if (chat != null) {
if (chat != null && chat.isEnabled()) {
mChat = (mChatSuite) chat;
mReader = mChat.getReader();
mWriter = mChat.getWriter();
@ -68,12 +68,12 @@ public class Chat_mChatSuite extends Chat {
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginEnable(PluginEnableEvent event) {
if (this.chat.mChat == null) {
Plugin chat = plugin.getServer().getPluginManager().getPlugin("mChat");
Plugin chat = plugin.getServer().getPluginManager().getPlugin("mChatSuite");
if (chat != null) {
this.chat.mChat = (mChatSuite) chat;
mReader = mChat.getReader();
mWriter = mChat.getWriter();
log.info(String.format("[%s][Chat] %s hooked.", plugin.getDescription().getName(), "mChat"));
log.info(String.format("[%s][Chat] %s hooked.", plugin.getDescription().getName(), "mChatSuite"));
}
}
}
@ -81,11 +81,11 @@ public class Chat_mChatSuite extends Chat {
@EventHandler(priority = EventPriority.MONITOR)
public void onPluginDisable(PluginDisableEvent event) {
if (this.chat.mChat != null) {
if (event.getPlugin().getDescription().getName().equals("mChat")) {
if (event.getPlugin().getDescription().getName().equals("mChatSuite")) {
this.chat.mChat = null;
mReader = null;
mWriter = null;
log.info(String.format("[%s][Chat] %s un-hooked.", plugin.getDescription().getName(), "mChat"));
log.info(String.format("[%s][Chat] %s un-hooked.", plugin.getDescription().getName(), "mChatSuite"));
}
}
}

View File

@ -234,10 +234,6 @@ public class Permission_PermissionsBukkit extends Permission {
public String[] getGroups() {
List<String> groupNames = new ArrayList<String>();
for (Group group : perms.getAllGroups()) {
//Ignore groups with bad data.
if (group == null || group.getName() == null) {
continue;
}
groupNames.add(group.getName());
}