mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-02 04:56:40 +00:00
Calculate the player count without offline players (FS-247) (#68)
Co-authored-by: Ryan <Wild1145@users.noreply.github.com>
This commit is contained in:
@ -838,6 +838,19 @@ public class FUtil
|
||||
}.runTaskLater(TotalFreedomMod.getPlugin(), delay);
|
||||
}
|
||||
|
||||
public static int getFakePlayerCount()
|
||||
{
|
||||
int i = TotalFreedomMod.getPlugin().al.vanished.size();
|
||||
for (String name : TotalFreedomMod.getPlugin().al.vanished)
|
||||
{
|
||||
if (Bukkit.getPlayer(name) == null)
|
||||
{
|
||||
i--;
|
||||
}
|
||||
}
|
||||
return getServer().getOnlinePlayers().size() - i;
|
||||
}
|
||||
|
||||
public static class PaginationList<T> extends ArrayList<T>
|
||||
{
|
||||
private final int epp;
|
||||
|
Reference in New Issue
Block a user