Posted November 4, 20186 yr How can I get the nickname of a player who hits with his hand at the time of using the command?
November 4, 20186 yr 1. What do you mean by "using the command"? Are you trying to create a command? 2. What do you mean by "a player who hits with his hand"? A player who is interacting with something? Please explain what you are trying to archieve.
November 4, 20186 yr Wheter "using the command" means actually using a command like /something or it means the players does some sort of action (like attacking an entity), you should have an event handler for these events and in that i'm pretty sure you'll find a reference to the player, wich then will give you access to all players informations, like the name in this case. You can find more about how to intercept an event here on the official Forge documentation. Note that this will give you the basics, for more advanced things you have to figure out by your own Don't blame me if i always ask for your help. I just want to learn to be better
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.