@EventHandler(priority = EventPriority.LOWEST) public void onPluginChannelRegister(PlayerRegisterChannelEvent e) { if (!e.getChannel().equals(BungeePerms.CHANNEL)) { return; } BukkitPlugin.getInstance().getNotifier().sendWorldUpdate(e.getPlayer()); }
public void addChannel(String channel) { if (channels.add(channel)) { server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel)); } }
public void addChannel(String channel) { com.google.common.base.Preconditions.checkState( channels.size() < 128, "Too many channels registered" ); // Spigot if (channels.add(channel)) { server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel)); } }