Skip to content

Commit

Permalink
also send update if not in a world
Browse files Browse the repository at this point in the history
  • Loading branch information
weaondara committed Dec 6, 2015
1 parent cb1253a commit 9412588
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Expand Up @@ -104,6 +104,8 @@ public void onLogin(PlayerLoginEvent e)
u = pm().createTempUser(playername, uuid);
pm().getBackEnd().saveUser(u, true);
}

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

//inject permissible
Permissible permissible = new Permissible(e.getPlayer(), u);
Expand Down
Expand Up @@ -76,7 +76,7 @@ public void reloadGroup(Group g, String origin)

sendPMAll("reloadGroup;" + g.getName(), origin);
}

@Override
public void reloadUsers(String origin)
{
Expand Down Expand Up @@ -121,7 +121,7 @@ private void sendPM(String player, String msg, String origin)
{
return;
}

Player p = Bukkit.getPlayer(player);
if (p != null)
{
Expand All @@ -136,7 +136,7 @@ private void sendPM(UUID player, String msg, String origin)
{
return;
}

Player p = Bukkit.getPlayer(player);
if (p != null)
{
Expand All @@ -151,7 +151,7 @@ private void sendPMAll(String msg, String origin)
{
return;
}

Player p = Bukkit.getOnlinePlayers().iterator().hasNext() ? Bukkit.getOnlinePlayers().iterator().next() : null;
if (p != null)
{
Expand All @@ -167,6 +167,7 @@ public void sendWorldUpdate(Player p)
return;
}

p.sendPluginMessage(BukkitPlugin.getInstance(), BungeePerms.CHANNEL, ("playerworldupdate;" + p.getName() + ";" + p.getWorld().getName()).getBytes());
String world = p.getWorld() == null ? "" : p.getWorld().getName();
p.sendPluginMessage(BukkitPlugin.getInstance(), BungeePerms.CHANNEL, ("playerworldupdate;" + p.getName() + ";" + world).getBytes());
}
}

0 comments on commit 9412588

Please sign in to comment.