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

Investigation - action [commandevent] might not work properly anymore #32

Open
BlitzOffline opened this issue Dec 28, 2023 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@BlitzOffline
Copy link
Member

Got a report in discord mentioning that [commandevent] action might not work anymore. The user has mentioned that they have updated both their server and DeluxeMenus. Will try to get hold of old and new versions for both.

Need to investigate this.

Conversation can be followed here.

@Starmism Starmism added the bug Something isn't working label Dec 30, 2023
@BlitzOffline BlitzOffline added the question Further information is requested label May 25, 2024
@BlitzOffline
Copy link
Member Author

I was able to replicate the behavior on Paper 1.21.

It seems that the server no longer executes the commands from the PlayerCommandPreprocessEvent event. Not sure we can do anything about this.

For [commandevent] we send a PlayerCommandPreprocessEvent.
For [player] we execute Player#chat with a slash appended at the start of the message.

Looking into the CraftBukkit code, it would seem that Player#performCommand runs different code than Player#chat so maybe we can replace the PlayerCommandPreprocessEvent with Player#performCommand?

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java#501

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

No branches or pull requests

2 participants