Skip to content

Any plugin Brig command with a req. predicate is now restricted with no opt-out #13590

Description

@MartinRedheLind

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

  1. Register any brigadier command that requires the sender to be a player (example below)
  2. Send a chat message with a click event that runs the newly registered command
  3. 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

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    mitigatedWorkaround found for this issue.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.11Game version 1.21.11

    Type

    Fields

    MC Issue

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions