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

Fabric still receives original Message when a plugin modifies said Message #114

Closed
Schmazda opened this issue Oct 3, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Schmazda
Copy link

Schmazda commented Oct 3, 2024

I am using the latest version (1.2.4) using a 1.21 Fabric server and Velocity 3.3.0-SNAPSHOT-436

This happens when I use ChatResult.message() to remove the Prefix that specifies the desired Audience.
In this case the prefix symbolizes the MineCraft Server, i.e. the Vanilla Chat.
If this helps, here is the snippet of my Plugin's code:
image
The Event is registered with PostOrder.FIRST, so it is definitely executed before SignedVelocity's EventListener.

Here is what the Client receives:
image
The first message is the expected/modified message; the second message is the original message.

@Schmazda
Copy link
Author

Schmazda commented Oct 3, 2024

For all Velocity Plugin devs reading this: an ugly hotfix is to just send the message to the RegisteredServer yourself and returning ChatEvent.denied() even when you just modify the messages content.

@4drian3d 4drian3d added bug Something isn't working help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Nov 4, 2024
@4drian3d
Copy link
Owner

image
Fixed, confirmed to work in Fabric 1.21.1, the next version will have the fix

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

2 participants