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

[Bug]: Random Things Floo Network teleportation chats get put into Discord #555

Open
Ricket opened this issue Nov 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Ricket
Copy link

Ricket commented Nov 7, 2023

What happened?

Random Things mod has Floo Teleportation that works like in Harry Potter: hold some floo powder, stand in a fireplace, say (in chat) the name of the destination you want to teleport to, and you will be sent there. The chat message doesn't get sent to other players. But, DiscordIntegration does sent the chat message to Discord. So players who are teleporting appear like they are spamming the chat with the teleport destination names.

Game Version

1.12

What platform are you using?

Forge

Platform version

14.23.5.2855

Config File

n/a

Crash report / Error log (if applicable)

No response

Additional Information

No response

@Ricket Ricket added the bug Something isn't working label Nov 7, 2023
@Ricket
Copy link
Author

Ricket commented Nov 7, 2023

See attached PR for the fix; I tested it in my server with Random Things RandomThings-MC1.12.2-4.2.7.4.jar .

You can see here that Random Things handles ServerChatEvent and, if the player is standing in a fireplace and says a valid teleport destination, then it calls event.setCanceled(true);

So by setting priority to lowest and checking the cancelled flag, Discord Integration can ignore the teleport chat message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant