Posted October 23, 20159 yr The Player Logged In Event gives an player entity as part of the event, but I need it as an Abstract Client Player a cast does not work is there a where I can this. Or is there another way to get player in question
October 23, 20159 yr Why do you need AbstractClientPlayer specifically? That is a CLIENT side only class, for one, so you'll want to check side before you check for instanceof, and the possible actual classes could be either EntityOtherPlayerMP or EntityPlayerSP... neither of which seem particularly useful. What are you trying to do, and what have you tried? http://i.imgur.com/NdrFdld.png[/img]
October 23, 20159 yr Author Allow the player to change there skin in game and to visible to every one on the server and the player's skin is defined in the AbstractClientPlayer yes EntityOtherPlayerMP or EntityPlayerSP could work but i believe the best way to go about is to use the AbstractClientPlayer. Also the event is wired up in client proxy so is just running on the client side
October 23, 20159 yr Author Skins are entirely client side. So only people who have your mod installed can see any potentially changed skin. I see you point but mod allows the change of player via i wardrobe which will loaded on the server.
October 26, 20159 yr Author I know the skin is client size but how do i get the abstract client player from an entity player?
October 26, 20159 yr Every client-sided EntityPlayer is an instance of AbstractClientPlayer (meaning you can freerly cast it, as long as you are on client thread and do it via proxy, since it is client side class). ACP does NOT exist on server thread. To give you wider look - click on EntityPlayer and choose "Type Hierarchy". ACP is base of all client-sided players, EntityPlayerMP for all server-sided ones. 1.7.10 is no longer supported by forge, you are on your own.
October 28, 20159 yr I know the skin is client size but how do i get the abstract client player from an entity player? Use the EntityJoinWorldEvent and check the instance of the entity there compared to the AbstractClientPlayer. Then cast the event.entity to AbstractClientPlayer and do whatever you need. Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]
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.