From edb9f4616741d7d7bad6c4cd01b0dd76e695c7b8 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Fri, 8 Feb 2019 14:45:00 +0100 Subject: [PATCH] Switch to Bukkit.getOnlinePlayers --- src/com/massivecraft/factions/engine/EngineSeeChunk.java | 3 ++- src/com/massivecraft/factions/entity/Faction.java | 3 ++- src/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/factions/engine/EngineSeeChunk.java b/src/com/massivecraft/factions/engine/EngineSeeChunk.java index 989b0f9a..ab4ee414 100644 --- a/src/com/massivecraft/factions/engine/EngineSeeChunk.java +++ b/src/com/massivecraft/factions/engine/EngineSeeChunk.java @@ -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; diff --git a/src/com/massivecraft/factions/entity/Faction.java b/src/com/massivecraft/factions/entity/Faction.java index 08f5ee97..607d3797 100644 --- a/src/com/massivecraft/factions/entity/Faction.java +++ b/src/com/massivecraft/factions/entity/Faction.java @@ -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 implements FactionsParticipator, MP List ret = new MassiveList<>(); // Fill Ret - for (Player player : MUtil.getOnlinePlayers()) + for (Player player : Bukkit.getOnlinePlayers()) { if (MUtil.isntPlayer(player)) continue; diff --git a/src/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java b/src/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java index 22787a69..b00fcd62 100644 --- a/src/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java +++ b/src/com/massivecraft/factions/task/TaskPlayerPowerUpdate.java @@ -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;