EntityPlayerMP.playerNetServerHandler contains a NetServerHandler
Entity.worldObj refers to WorldServer
WorldServer.playerEntities contains a collection of EntityPlayers
The map can be used to find a way to access the particular Class you need, starting with the Class(es) your code has been provided with.
NB - there are several ways of getting to EntityPlayerMP depending on which ones you want:
- To get all players on the server, use ServerConfigurationManager.playerEntityList()
- To get all players within range of a particular chunk, start from PlayerManager()
- For the player corresponding to a particular NetServerHandler, use .playerEntity
- For all players within range of a particular Entity, start from EntityTracker.
- For all players in a particular dimension, use worldServer.playerEntities, where you get worldServer using MinecraftServer.getServer().worldServerForDimension or DimensionManager.getWorld()