Posted January 10, 201312 yr Hey guys, Just wondering are players assigned individual ID's once they join the server so you can get them by that id instead of their username? This would have to be constant not something that gets assigned new each time they log in.
January 10, 201312 yr if you want, you can use MinecraftServer.getServer.playerEntities(list of all player entities) or Minecraft.getMinecraft.theWorld.playersList (or something i dont have eclips to check right now)
January 10, 201312 yr Since each player is an object of EntityPlayerMP class, it is an entity, so it has it's unique Entity ID (which is by the way shown in the server console). There is the way to access it from Entity class (this class got public int entityId field) http://www.minecraftforum.net/topic/1871576-152-161forgealchemy-enhance-your-brewing-expirience-now-with-downloads/ Check it out!
January 10, 201312 yr However this ID is dynamic, so I doubt you would be able to use it like a constant marker. http://www.minecraftforum.net/topic/1871576-152-161forgealchemy-enhance-your-brewing-expirience-now-with-downloads/ Check it out!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.