Skip to content
Permalink
Browse files

Merge branch '2.x' of github.com:essentials/Essentials into 2.x

  • Loading branch information...
khobbits committed Sep 2, 2014
2 parents 98db85c + f36d629 commit 767596c4e5627bc386ae03e127f5050dcb22b89b
@@ -325,9 +325,8 @@ private void registerListeners(PluginManager pm)
@Override
public void onDisable()
{
for (Player p : getServer().getOnlinePlayers())
for (User user : getOnlineUsers())
{
User user = getUser(p);
if (user.isVanished())
{
user.setVanished(false);
@@ -562,9 +561,8 @@ else if (user == null)

public void cleanupOpenInventories()
{
for (Player player : getServer().getOnlinePlayers())
for (User user : getOnlineUsers())
{
User user = getUser(player);
if (user.isRecipeSee())
{
user.getBase().getOpenInventory().getTopInventory().clear();
@@ -742,7 +740,7 @@ public void onPlayerJoin(final PlayerJoinEvent event)
event.getPlayer().sendMessage("Essentials failed to load, read the log file.");
}
}, this);
for (Player player : getServer().getOnlinePlayers())
for (Player player : getOnlinePlayers())
{
player.sendMessage("Essentials failed to load, read the log file.");
}
@@ -780,7 +780,7 @@ public void setVanished(final boolean set)
}
else
{
for (Player p : ess.getServer().getOnlinePlayers())
for (Player p : ess.getOnlinePlayers())
{
p.showPlayer(getBase());
}
@@ -103,10 +103,9 @@ private String getLocal(final Server server, final User user, final long radius)
final long radiusSquared = radius * radius;
boolean showHidden = user.canInteractVanished();

for (Player onlinePlayer : server.getOnlinePlayers())
for (User player: ess.getOnlineUsers())
{
final User player = ess.getUser(onlinePlayer);
if (!player.equals(user) && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(onlinePlayer)))
if (!player.equals(user) && (!player.isHidden(user.getBase()) || showHidden || user.getBase().canSee(player.getBase())))
{
final Location playerLoc = player.getLocation();
if (playerLoc.getWorld() != world)
@@ -220,9 +220,9 @@ private void setUsersTime(final CommandSource sender, final Collection<User> use
// If that fails, Is the argument something like "*" or "all"?
else if (selector.equalsIgnoreCase("*") || selector.equalsIgnoreCase("all"))
{
for (Player player : server.getOnlinePlayers())
for (User u : ess.getOnlineUsers())
{
users.add(ess.getUser(player));
users.add(u);
}
}
// We failed to understand the world target...
@@ -170,9 +170,9 @@ private void setUsersWeather(final CommandSource sender, final Collection<User>
// If that fails, Is the argument something like "*" or "all"?
else if (selector.equalsIgnoreCase("*") || selector.equalsIgnoreCase("all"))
{
for (Player player : server.getOnlinePlayers())
for (User u : ess.getOnlineUsers())
{
users.add(ess.getUser(player));
users.add(u);
}
}
// We failed to understand the world target...
@@ -222,7 +222,7 @@ else if (validKeyword.getType().equals(KeywordCachable.SUBVALUE))

//Now lets build the all user playerlist
final StringBuilder playerlistBuilder = new StringBuilder();
for (Player p : ess.getServer().getOnlinePlayers())
for (Player p : ess.getOnlinePlayers())
{
if (ess.getUser(p).isHidden())
{

0 comments on commit 767596c

Please sign in to comment.
You can’t perform that action at this time.