Closed Artuto closed 1 month ago
Player does not extend or implement CommandSourceStack. Your first method has no sender parameter and an extraneous player parameter that does not correspond to a command argument.
So how does one limit a command to players now?
You can create a small wrapper around CommandSourceStack (ie interface PlayerStack extends EntityStack extends GenericStack) and choose which one to create based on the source in your sender mapper.
I have two command methods:
But when executing
/mb off
without arguments it should execute the first command, but instead it throws an exception:Executing the command with a player name as argument works as expected.
Library versions: