-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Expected behavior
Command nodes with requirements that that only check if the sender is a player (and don't use Commands.restricted()) should remain clickable in chat when used in click events.
Observed/Actual behavior
Any command node that requires the sender to be a player is treated as restricted, causing a confirmation menu to appear when executed from a click event.
Steps/models to reproduce
- Register any brigadier command that requires the sender to be a player (example below)
- Send a chat message with a click event that runs the newly registered command
- Click the message and observe the confirmation menu
Example code
getLifecycleManager().registerEventHandler(LifecycleEvents.COMMANDS, event -> event.registrar().register(Commands.literal("test")
.requires(source -> source.getSender() instanceof Player)
.executes(context -> {
context.getSource().getSender().sendMessage(Component.text("Click me!").clickEvent(ClickEvent.runCommand("test")));
return 1;
})
.build()));Plugin and Datapack List
[11:41:29 INFO]: Server Plugins (1):
[11:41:29 INFO]: Bukkit Plugins:
[11:41:29 INFO]: - TestPlugin
[11:41:31 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[11:41:31 INFO]: There are no more data packs available
Paper version
This server is running Paper version 1.21.11-100-main@4873e3f (2026-01-29T11:02:49Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-97-b5e7257 (MC: 1.21.11)
Other
No response