Fixed errors for new getPlayers method.

This commit is contained in:
Chiss 2014-08-20 10:43:56 +10:00
parent 7535f39d18
commit 94e5eb03da
9 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ public class UtilServer
{
public static Player[] getPlayers()
{
return getServer().getOnlinePlayers().toArray(new Player[0]);
return getServer().getOnlinePlayers();
}
public static Server getServer()

View File

@ -217,7 +217,7 @@ public class CoreClientManager extends MiniPlugin
client.SetPlayer(event.getPlayer());
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
{
if (client.GetRank().Has(event.getPlayer(), Rank.ULTRA, false))
{

View File

@ -357,7 +357,7 @@ public class AntiHack extends MiniPlugin
UtilServer.broadcast(F.main("MAC", player.getName() + " was kicked for suspicious movement."));
ServerListPingEvent event = new ServerListPingEvent(null, Bukkit.getServer().getMotd(), Bukkit.getServer().getOnlinePlayers().size(), Bukkit.getServer().getMaxPlayers());
ServerListPingEvent event = new ServerListPingEvent(null, Bukkit.getServer().getMotd(), Bukkit.getServer().getOnlinePlayers().length, Bukkit.getServer().getMaxPlayers());
GetPluginManager().callEvent(event);
String motd = event.getMotd();

View File

@ -94,7 +94,7 @@ public class FriendManager extends MiniClientPlugin<FriendData> implements IPack
@EventHandler
public void updateFriends(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW || Bukkit.getOnlinePlayers().size() == 0)
if (event.getType() != UpdateType.SLOW || Bukkit.getOnlinePlayers().length == 0)
return;
Bukkit.getServer().getScheduler().runTaskAsynchronously(_plugin, new Runnable()

View File

@ -153,7 +153,7 @@ public class Portal extends MiniPlugin
@EventHandler
public void checkForServerTransfers(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC || Bukkit.getOnlinePlayers().size() == 0)
if (event.getType() != UpdateType.SEC || Bukkit.getOnlinePlayers().length == 0)
return;
_retrieve = !_retrieve;

View File

@ -131,11 +131,11 @@ public class ServerStatusManager extends MiniPlugin
*/
private MinecraftServer generateServerSnapshot()
{
ServerListPingEvent event = new ServerListPingEvent(null, GetPlugin().getServer().getMotd(), GetPlugin().getServer().getOnlinePlayers().size(), GetPlugin().getServer().getMaxPlayers());
ServerListPingEvent event = new ServerListPingEvent(null, GetPlugin().getServer().getMotd(), GetPlugin().getServer().getOnlinePlayers().length, GetPlugin().getServer().getMaxPlayers());
GetPluginManager().callEvent(event);
String motd = event.getMotd();
int playerCount = Bukkit.getOnlinePlayers().size();
int playerCount = Bukkit.getOnlinePlayers().length;
int maxPlayerCount = event.getMaxPlayers();
int tps = (int) _lagMeter.getTicksPerSecond();
String address = Bukkit.getServer().getIp().isEmpty() ? "localhost" : Bukkit.getServer().getIp();

View File

@ -447,7 +447,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
CoreClient client = _clientManager.Get(event.getPlayer().getName());
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() - Bukkit.getServer().getMaxPlayers() >= 20)
if (Bukkit.getOnlinePlayers().length - Bukkit.getServer().getMaxPlayers() >= 20)
{
if (!client.GetRank().Has(Rank.ULTRA))
{

View File

@ -565,7 +565,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
}
// Reserved Slot Check
if (Bukkit.getOnlinePlayers().size() >= Bukkit.getServer().getMaxPlayers())
if (Bukkit.getOnlinePlayers().length >= Bukkit.getServer().getMaxPlayers())
{
if (_serverStatusManager.getCurrentServerName().contains("BETA"))
{

View File

@ -226,7 +226,7 @@ public class PowerUpManager implements Listener
if (getGame().GetState() != GameState.Live)
return;
Collection<? extends Player> players = Bukkit.getOnlinePlayers();
Player[] players = Bukkit.getOnlinePlayers();
for (Player player : players)
{