package mcp.mobius.opis.server; import java.util.HashMap; import java.util.HashSet; import mcp.mobius.opis.overlay.OverlayStatus; import net.minecraft.entity.player.EntityPlayer; import cpw.mods.fml.common.IPlayerTracker; import cpw.mods.fml.common.network.Player; public class PlayerTracker implements IPlayerTracker{ private static PlayerTracker _instance = new PlayerTracker(); public static PlayerTracker instance() {return _instance;} private PlayerTracker(){} public HashSet playersSwing = new HashSet(); //This is the list of players who have opened the UI public HashSet playersOpis = new HashSet(); //This is the list of players who have opened the UI or used the command line public HashMap filteredAmount = new HashMap(); //Should the entity amount be filtered or not public HashMap playerOverlayStatus = new HashMap(); public HashMap playerDimension = new HashMap(); private HashSet playerPriviliged = new HashSet(); public void addPriviligedPlayer(String name){ this.playerPriviliged.add(name); } public void rmPriviligedPlayer(String name){ this.playerPriviliged.remove(name); } public boolean isPlayerPriviliged(String name){ return this.playerPriviliged.contains(name); } @Override public void onPlayerLogin(EntityPlayer player) { } @Override public void onPlayerLogout(EntityPlayer player) { this.playerOverlayStatus.remove(player); this.playerDimension.remove(player); } @Override public void onPlayerChangedDimension(EntityPlayer player) { } @Override public void onPlayerRespawn(EntityPlayer player) { } }