Discord Integration Forge

Discord Integration Forge

935k Downloads

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

Ricket opened this issue ยท 1 comments

commented

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

commented

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.