下面列出了怎么用org.bukkit.event.player.PlayerRegisterChannelEvent的API类实例代码及写法,或者点击链接到github查看源代码。
@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) {
if (channels.add(channel)) {
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
}
}