Skip to content

Commit

Permalink
send the player's current world again if the plugin channel is regist…
Browse files Browse the repository at this point in the history
…ered by bungee; closes #187
  • Loading branch information
weaondara committed Dec 12, 2015
1 parent ce5c62d commit bdba1f8
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -22,6 +22,7 @@
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerRegisterChannelEvent;
import org.bukkit.permissions.PermissibleBase;
import org.bukkit.plugin.messaging.PluginMessageListener;

Expand Down Expand Up @@ -163,6 +164,17 @@ public void onUserUpdate(BungeePermsUserChangedEvent e)
updateAttachment(p, e.getUser());
}

@EventHandler
public void onPluginChannelRegister(PlayerRegisterChannelEvent e)
{
if (!e.getChannel().equals(BungeePerms.CHANNEL))
{
return;
}

BukkitPlugin.getInstance().getNotifier().sendWorldUpdate(e.getPlayer());
}

@Override
public void onPluginMessageReceived(String channel, Player player, byte[] bytes)
{
Expand Down

0 comments on commit bdba1f8

Please sign in to comment.