Skip to content

Properly respect UUID property of PacketPlayOutChat in 1.16+ #10

@foxfirecodes

Description

@foxfirecodes

See Discord thread here (in RayzrDev server, join here)

the conclusion of the above thread is:

... looks like the correct solution would be to have JSONMessage send UUID(0L, 0L) by default, and allow the specification of a custom UUID at send-time

this is used in the client as such:

   public void onChatMessage(MessageType arg, Text arg2, UUID uUID) {
      if (!this.client.shouldBlockMessages(uUID)) {
         if (arg != MessageType.CHAT) {
            this.client.inGameHud.getChatHud().addMessage(arg2);
         } else {
            this.client.inGameHud.getChatHud().method_27147(arg2);
         }

      }
   }

to verify whether the user should see messages, depending on whether online chat is enabled or not.

If online chat is disabled, it will verify the UUID is null / not the player

currently JSONMessage just sends a random UUID each time. this is not expected behavior and would cause system messages to be hidden from the user if online chat is disabled.

also see: Chat class in Bungee

credits @I-Al-Istannen & @extendedclip for a lot of these findings

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions