Using a Asyncplayerchatevent to change nick [Solved]

Discussion in 'Spigot Plugin Development' started by DevNCode, May 23, 2017.

  1. Ive been working on a nick plugin that when after it says.
    Type your new nick in chat.
    It looks for your message and uses that to change your nick.
    Would you use a Asyncplayerchatevent
    then use the message to change the name.
    If this is correct could you show me an example and if not could you show me how I should do this.
    Thanks for the Help!!!
  2. Use the conversation API :) (something already included in Bukkit)
  3. Just put the player to a ArrayList then after they change nick , remove them from it .
    When player chat . check if that ArrayList contain that player , if so , cancel the event , get the message then change his name
  4. How would I complete that sorry :( Im new to nick plugins.

    Edit: ArrayList<UUID> list = ....


    I think you have to do that but... Im not sure how to use it in my case.
  5. The way he explained it, it's more than enough if you know java and how to read a JavaDocs ( In any other case, you should learn java or check the docs better
  6. For example . You let him change nick with command /nick.
    After he /nick
    Add him to the ArrayList
    next time he chat . Cancel that event
    get the message . set the message to his name
    remove him from ArrayList . eisi
  7. Thanks

    Sent from my SM-G925P using Tapatalk