Switch to Bukkit.getOnlinePlayers

This commit is contained in:
Magnus Ulf 2019-02-08 14:45:00 +01:00
parent f6c4031827
commit edb9f46167
3 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import com.massivecraft.massivecore.particleeffect.ParticleEffect;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.PeriodUtil;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
@ -84,7 +85,7 @@ public class EngineSeeChunk extends Engine
final int amount = 30;
// For each player
for (Player player : MUtil.getOnlinePlayers())
for (Player player : Bukkit.getOnlinePlayers())
{
// Hide for dead players since the death screen looks better without.
if (player.isDead()) continue;

View File

@ -28,6 +28,7 @@ import com.massivecraft.massivecore.store.SenderColl;
import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.Txt;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -1118,7 +1119,7 @@ public class Faction extends Entity<Faction> implements FactionsParticipator, MP
List<Player> ret = new MassiveList<>();
// Fill Ret
for (Player player : MUtil.getOnlinePlayers())
for (Player player : Bukkit.getOnlinePlayers())
{
if (MUtil.isntPlayer(player)) continue;

View File

@ -11,6 +11,7 @@ import com.massivecraft.massivecore.ModuloRepeatTask;
import com.massivecraft.massivecore.ps.PS;
import com.massivecraft.massivecore.util.MUtil;
import com.massivecraft.massivecore.util.TimeUnit;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class TaskPlayerPowerUpdate extends ModuloRepeatTask
@ -40,7 +41,7 @@ public class TaskPlayerPowerUpdate extends ModuloRepeatTask
MFlag flagPowerGain = MFlag.getFlagPowergain();
// For each player ...
for (Player player : MUtil.getOnlinePlayers())
for (Player player : Bukkit.getOnlinePlayers())
{
// ... that is a living player ...
if (MUtil.isntPlayer(player)) continue;