@Override public void onDisable() { for (Chatter chatter : chatterManager.getChatters()) { chatterManager.removeChatter(chatter); } instance = null; chatterManager = null; channelManager = null; }
@Override public void onEnable() { chatterManager = new ChatterManager(); channelManager = new ChannelManager(); loadConfig(); channelManager.loadChannels(); getProxy().getPluginManager().registerListener(this, new EventListener()); getProxy().getPluginManager().registerCommand(this, new ChatCommand()); getProxy().getPluginManager().registerCommand(this, new MuteCommand()); getProxy().getPluginManager().registerCommand(this, new UnmuteCommand()); getProxy().getPluginManager().registerCommand(this, new PrivateMessageCommand()); for (ProxiedPlayer player : ProxyServer.getInstance().getPlayers()) { chatterManager.loadChatter(player); } }