Solved PlayerChatTabCompleteEvent never firing

Discussion in 'Plugin Development' started by nathanthesnooper, Mar 13, 2018.

Thread Status:
Not open for further replies.
  1. Code:
    public void playerChatTabCompleteEvent (PlayerChatTabCompleteEvent event) {
    And yes, the events are registered, and other events in the same class are working

    No errors on startup/runtime/compiling


    Solution was ProtocolLib:

    ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter (this, PacketType.Play.Client.TAB_COMPLETE) {
        public void onPacketReceiving (PacketEvent event) {
            List<String> completions = new ArrayList<String>();
            completions.add("/msg"); //Do whatever
            PacketContainer packet = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.TAB_COMPLETE);
            packet.getStringArrays().write(0, completions.toArray(new String[0]));
            try {
                ProtocolLibrary.getProtocolManager().sendServerPacket(event.getPlayer(), packet);
            } catch (InvocationTargetException e) {
    Last edited: Mar 13, 2018
  2. Offline


    Are you testing this by checing if they are using the command tab, or are you testing using regular chat tab?
  3. @Zombie_Striker I see what you mean now, is there a command tab event?
  4. Offline


    Sort of; not an event.

    onTab is a method that is used to listen for tabs for commands that your plugin creates.
  5. @Zombie_Striker
    I found a solution by using protocollib, I edited my answer. Thanks though!
Thread Status:
Not open for further replies.

Share This Page