4drian3d / SignedVelocity

Allows you to cancel or modify messages or commands from Velocity without synchronization problems
https://modrinth.com/mod/signedvelocity
GNU General Public License v3.0
36 stars 10 forks source link

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

Open Schmazda opened 1 month ago

Schmazda commented 1 month ago

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 commented 1 month ago

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.