Help Tab Complete

Discussion in 'Plugin Development' started by BlueMustache, Jun 18, 2014.

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

    BlueMustache

    Hey Guys,
    I was messing around with TabComplete today, and I had a question.
    I am new to collections, and the java doc was confusing.
    So if I do this:

    Code:java
    1. public void onPlayerChatTabCompleteEvent(PlayerChatTabCompleteEvent event) {
    2. event.getTabCompletions().clear();
    3. //put more code here
    4. }


    After the .clear(), how might I have it return say "String 1, String 2, String 3"; as the tab complete?
    Thnx,
    -Blue

    Below is incase you wondered why this was edited so many times.
    ============================================
    EDIT: Code cleaned up.
    EDIT 2: Rebel bracket.
    EDIT 3: Random 4 removed, and this was written.
     
  2. Offline

    BlueMustache

  3. Offline

    techboy291

    Collections have an add() method, so invoking that on event.getTabCompletions() should work.
     
  4. Offline

    BlueMustache

    techboy291

    "I am new to collections, and the java doc was confusing." -BlueMustache
    Any more you can give than that?
    I wanna add my own strings.
    I want the tab complete to suggest custom strings when my command is brought up.
     
  5. Offline

    xTigerRebornx

    BlueMustache Well, if you don't know what a Collection is, go learn what it is.
    When you learn, review the "Collections have an add method"
     
Thread Status:
Not open for further replies.

Share This Page