Search code examples
javaminecraftbukkit

PlayIn Packets for TabComplete Bukkit 1.8 R3


I am trying to modify the TabComplete Action in Minecraft on my server (version 1.8 R3). I want to edit the tab auto complete pool with a pool from me and I did that using protocollib. The Problem is, the pool should be fit to the last tooken of the sentence, typed in to chat. Otherwise it is not a TabComplete but just a showing of all options rather than adjusting the pool to what option you seek.

So for example: I type /test t[TAB] and the Pool is something like that: test, urf, halo tinker. What should happen is that those options are showing:

test, tinker

what really show up is:

test, urf, halo, tinker

because I only can replace the pool in the tabcompletepacket. but not get the actually t[tab] which I need to adjust my pool. Which packet gives those informations to the server?

//EDIT No point of leaving this as unanwsered. My problems was, that I did not saw the PlayInTabComplete-Function which actually gives you the String needed. By connection those two packets via a variable it is very easy to edit the pool as I want.


Solution

  • For your example with /test, is test your command? If it is so you can easily add a tabcomple function to the command. There you can also check all arguments given and answer with a list.