Use inhouse getOnlinePlayers method.

This commit is contained in:
Olof Larsson 2014-12-03 02:13:39 +01:00
parent 70c5e36645
commit e5d7749255
4 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,6 @@ import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
@ -20,6 +19,7 @@ import com.massivecraft.massivecore.EngineAbstract;
import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave;
import com.massivecraft.massivecore.particleeffect.ParticleEffect;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.PeriodUtil;
public class EngineSeeChunk extends EngineAbstract
@ -99,7 +99,7 @@ public class EngineSeeChunk extends EngineAbstract
final int amount = MConf.get().seeChunkParticleAmount;
// For each player
for (Player player : Bukkit.getOnlinePlayers())
for (Player player : MUtil.getOnlinePlayers())
{
// Hide for dead players since the death screen looks better without.
if (player.isDead()) continue;

View File

@ -3,7 +3,6 @@ package com.massivecraft.factions.entity;
import java.util.*;
import java.util.Map.Entry;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -1076,7 +1075,7 @@ public class Faction extends Entity<Faction> implements EconomyParticipator
public List<Player> getOnlinePlayers()
{
List<Player> ret = new ArrayList<Player>();
for (Player player : Bukkit.getOnlinePlayers())
for (Player player : MUtil.getOnlinePlayers())
{
MPlayer mplayer = MPlayer.get(player);
if (mplayer.getFaction() != this) continue;

View File

@ -25,6 +25,7 @@ import com.dthielke.herochat.MessageNotFoundException;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.massivecore.util.MUtil;
public abstract class ChannelFactionsAbstract implements Channel
{
@ -234,7 +235,7 @@ public abstract class ChannelFactionsAbstract implements Channel
Faction faction = fpsender.getFaction();
String universe = fpsender.getUniverse();
for (Player player : Bukkit.getOnlinePlayers())
for (Player player : MUtil.getOnlinePlayers())
{
MPlayer frecipient = MPlayer.get(player);
if (!frecipient.getUniverse().equals(universe)) continue;

View File

@ -1,6 +1,5 @@
package com.massivecraft.factions.task;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import com.massivecraft.factions.entity.MConf;
@ -8,6 +7,7 @@ import com.massivecraft.factions.entity.MPlayer;
import com.massivecraft.factions.event.EventFactionsPowerChange;
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
import com.massivecraft.massivecore.ModuloRepeatTask;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.TimeUnit;
public class TaskPlayerPowerUpdate extends ModuloRepeatTask
@ -40,7 +40,7 @@ public class TaskPlayerPowerUpdate extends ModuloRepeatTask
{
long millis = this.getDelayMillis();
for (Player player : Bukkit.getOnlinePlayers())
for (Player player : MUtil.getOnlinePlayers())
{
if (player.isDead()) continue;