onTabComplete

Discussion in 'Plugin Development' started by jsutaria, Apr 7, 2016.

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

    jsutaria

    I was wondering how to use onTabComplete whenever an @ sign pops up. Ex, when a player is doing /test @(taggingaplayer) how are you.

    Or: /test how are you @(taggingaplayer)
    Or: /test how is it going mr@(taggingaplayer) ? Life is good for me

    And anywhere in the message
     
  2. Maybe use a for loop to check all args if they start with an @ and if they do, remove the @ at the beginning of the String and then loop through all the online players and check if their name starts with the String you got earlier without the @.
     
  3. Offline

    Zombie_Striker

    @jsutaria
    Here's a written version of what you need to write in code.
    1. OnTabComplete
    2. If the arg the player is tabbing for starts with what the player has already typed in, add add the arg to an List.
    3. Return that List
     
    Lightspeed likes this.
Thread Status:
Not open for further replies.

Share This Page