How to get the players name?

Discussion in 'Plugin Development' started by Brevoort, Oct 20, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Brevoort

    I want to make it so when you message someone you it will be:

    <Name>: <Message>

    How would I make a variable for the players name where whenever I put playerName the player appears.
     
  2. x.getName() where is the player (e.getPlayer())
     
  3. Offline

    Brevoort

    How could I make this into a variable?
     
  4. Don't see why but you would want to needs to pass the player into a void and send that player a message
     
  5. Offline

    Brevoort

    I just want to make it so when I need a players name I can just use a variable.
     
  6. Offline

    Zombie_Striker

    @Brevoort
    Either you are using the wrong word, thinking about what you are doing the wrong way, or we are not really seeing what you are trying to do.

    Player#getName() Is a variable that is equal to the players name. That is the variable. Use that when you want to get the player's name.
     
    Last edited: Oct 20, 2016
Thread Status:
Not open for further replies.

Share This Page