[SPIGOT-1417] Chat API sends null packet Created: 12/Jan/16  Updated: 14/Jan/16  Resolved: 13/Jan/16

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: hockeymikey Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: 1.8, api, bug, bungeecord, chat, spigot
Environment:

Ubuntu 14.04
Kimsufi KS-4
Most recent Spigot version
Java 8


Plugin: GrottoCore (mine), VentureChat (MineverseChat), ProtocolLib

 Description   

Issue can be seen described in this thread: https://www.spigotmc.org/threads/venturechat.24005/page-149

When I send a simple message using the Chat API, such as:

TextComponent wow = new TextComponent("welcome there");
wow.setColor(ChatColor.RED);
player.spigot().sendMessage(wow);

Both his plugin and ProtocolLib return a NullPointerException from the message.



 Comments   
Comment by hockeymikey [ 14/Jan/16 ]

Appears you are correct. It's MineverseChat acting up which I suspected but the dev insisted it was Spigot. Thanks for the help

Comment by md_5 [ 13/Jan/16 ]

Cannot reproduce, clearly no null packet from Spigot either:

        @Override
        public void sendMessage(BaseComponent component) {
          sendMessage( new BaseComponent[] { component } );
        }

        @Override
        public void sendMessage(BaseComponent... components) {
           if ( getHandle().playerConnection == null ) return;

            PacketPlayOutChat packet = new PacketPlayOutChat();
            packet.components = components;
            getHandle().playerConnection.sendPacket(packet);
        }

I would suggest conflicting plugins.

Generated at Fri Mar 14 15:03:38 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.