Any plugin Brig command with a req. predicate is now restricted with no opt-out
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the COMMANDS lifecycle registration and the Brigadier .requires predicate shown in the reproducer, then trace how click-event runCommand executions classify restricted commands. Add a regression test covering a player-only requirement without Commands.restricted(), and verify that the click event remains usable without a confirmation menu while explicitly restricted commands retain their restriction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100