Solved Custom TAB Completer

Discussion in 'Plugin Development' started by mazentheamazin, Feb 13, 2014.

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

    mazentheamazin

    I was wondering if its possible and how to add a TAB List. For example: If a player press's TAB it has auto-suggestions used for commands. So, what I am making is a twitter plugin. I am wanting for this plugin to do @ then be able to press TAB and is able to see everybody on the server as an autosuggestion.

    Thanks in Advance,
    Mazen
     
  2. Offline

    ztowne13

  3. Offline

    mazentheamazin

    ztowne13
    How would I modify the auto suggestions though?
     
  4. Offline

    _Filip

    If I recall this requires replacing an nms list using reflection.
     
  5. Offline

    mazentheamazin

  6. Offline

    _Filip

    mazentheamazin
    "If I recall".
    I'm sure you could find the answer by googling it.
     
  7. Offline

    mazentheamazin

    swampshark19
    Ah, is anybody else be willing to help me figure this out?
     
  8. Offline

    werter318

    use getCommand("test").setTabCompleter(puttabcompleterhere);
     
  9. Offline

    mazentheamazin

    werter318
    So, how would I make the TAB completer not require a / as I am wanting to do a @ sign.
     
  10. Offline

    Garris0n

    There's an onTabComplete() or something that you use just like onCommand().
     
  11. Offline

    Wolvereness Bukkit Team Member

    No, it doesn't. You can use the event for normal chat tab-completion, or implement the TabCompleter interface for command tab-completion.
    If you are tab-completing a normal chat-message, then there is an event. If you are tab-completing a command (some message that starts with /) there is an interface to supply to your plugin command.
     
    mazentheamazin and swampshark19 like this.
  12. Offline

    _Filip

  13. Offline

    mazentheamazin

Thread Status:
Not open for further replies.

Share This Page