mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
Fix missed cases from previous user iteration optimizations.
This commit is contained in:
parent
3f1c996959
commit
037456c99d
@ -325,9 +325,8 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
||||
@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 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
||||
|
||||
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 class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
|
||||
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 class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
||||
}
|
||||
else
|
||||
{
|
||||
for (Player p : ess.getServer().getOnlinePlayers())
|
||||
for (Player p : ess.getOnlinePlayers())
|
||||
{
|
||||
p.showPlayer(getBase());
|
||||
}
|
||||
|
@ -103,10 +103,9 @@ public class Commandnear extends EssentialsCommand
|
||||
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 @@ public class Commandptime extends EssentialsCommand
|
||||
// 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 @@ public class Commandpweather extends EssentialsCommand
|
||||
// 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 @@ public class KeywordReplacer implements IText
|
||||
|
||||
//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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user