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

Cannot modify player chat message on server, event is wrong type #828

Open
PrincessRTFM opened this issue May 6, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@PrincessRTFM
Copy link

Minecraft Version

1.20.1

KubeJS Version

2001.6.5-build.7

Rhino Version

2001.2.2-build.18

Architectury Version

9.2.14

Forge/Fabric Version

Forge 47.2.21

Describe your issue

ProbeJS says that the ServerEvents.chat event type should be Internal.PlayerChatDecorateEventJS, and looking through the code shows a PlayerChatDecorateEventJS.java file, but attempting to set the message property of the event or invoke the setMessage() method fails. The server.log file indicates that the property/method cannot be found on the type dev.latvian.mods.kubejs.player.PlayerChatReceivedEventJS, which a quick check of the relevant file shows is accurate.

Strangely, checking the PlayerEvents binding file shows that this should use the expected PlayerChatDecorateEventJS event. Using the ServerEvents.decorateChat handler instead does work as expected, providing the correct event type.

Crash report/logs

No response

@PrincessRTFM PrincessRTFM added the bug Something isn't working label May 6, 2024
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