MTLabsAbed Posted August 18, 2013 Share Posted August 18, 2013 Hi How to get EntityPlayer from Nickname in PacketHandler ? public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player) { if (packet.channel.equals("MyChannel")) { DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); try { String Nickname = inputStream.readUTF(); // Nickname to EntityPlayer ?? } catch (IOException e) { e.printStackTrace(); return; } } } Quote Link to comment Share on other sites More sharing options...
hydroflame Posted August 18, 2013 Share Posted August 18, 2013 reference players by entityId its faster and more secure else youll have to get the entity lost and check by yourself Quote how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution- Link to comment Share on other sites More sharing options...
MTLabsAbed Posted August 19, 2013 Author Share Posted August 19, 2013 Ok, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.