-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.10Game version 1.21.10Game version 1.21.10
Description
Expected behavior
An instance of BlockCommandSender, because I want to get the command sender (command block) name & location in the world.
Observed/Actual behavior
NullCommandSender, that returns "" from getName and cannot be cast to BlockCommandSender to get a location.
But if I enable the command output, then BlockCommandSender is returned as before.
Steps/models to reproduce
- Place an impulse command block in the world, type
testcommand from test plugin and disable the output. - Power on the command block via button, lever or anything other.
- Meet the
NullCommandSender, that isn't exposed in the API.
Plugin and Datapack List
Only a test plugin w/ test command:
@Override
public boolean onCommand(CommandSender theSender, Command theCommand, String theCNS, String[] vAA) {
System.out.println("CommandSender: " + theSender.getClass());
}Paper version
> version
This server is running Paper version 1.21.10-100-main@e8c6ba5 (2025-11-01T22:04:43Z) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.8-60-29c8822 (MC: 1.21.8)
Other
Before, in 1.21.8, BlockCommandSender was returned in all cases, and everything worked w/o issues.
I think this is a breaking change, and I don't remember it being reported in change logs...
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.10Game version 1.21.10Game version 1.21.10