Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly respect UUID property of PacketPlayOutChat in 1.16+ #10

Open
rayzr522 opened this issue Jul 14, 2020 · 0 comments
Open

Properly respect UUID property of PacketPlayOutChat in 1.16+ #10

rayzr522 opened this issue Jul 14, 2020 · 0 comments
Assignees
Labels

Comments

@rayzr522
Copy link
Owner

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
@rayzr522 rayzr522 self-assigned this Jul 14, 2020
@rayzr522 rayzr522 added the bug label Jul 14, 2020
@rayzr522 rayzr522 added this to the 1.2.2 milestone Jul 14, 2020
@rayzr522 rayzr522 removed this from the 1.2.2 milestone Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant