Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Cancelling PlayerCommandPreprocessEvent causes "missing or invalid chat signature"

Open RhythmicSys opened this issue 2 years ago • 0 comments

Expected behavior

Cancelling a player's command would cancel the command being run The player would be able to chat as intended

Observed/Actual behavior

After a player's command is cancelled, they cannot chat or run another command without being kicked.

Steps/models to reproduce

A simple plugin with a class that contains this code:

public class CommandListener implements Listener {
    @EventHandler
    public void onCommand(PlayerCommandPreprocessEvent event) {
        event.setCancelled(true);
    }
}

Will cause this situation:

https://github.com/PaperMC/Paper/assets/45906780/dc7fffe1-de28-423d-a79f-81eab9dc4ede

Plugin and Datapack List

[13:56:55 INFO]: Server Plugins (1):
[13:56:55 INFO]: Paper Plugins:
[13:56:55 INFO]:  - CommandTest
[13:57:36 INFO]: There are 2 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)]
[13:57:36 INFO]: There are no more data packs available

Paper version

[13:58:02 INFO]: This server is running Paper version git-Paper-298 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: e1cd9e5)
You are running the latest version

Other

No response

RhythmicSys avatar Nov 22 '23 21:11 RhythmicSys