Lamp icon indicating copy to clipboard operation
Lamp copied to clipboard

Cannot have commands with '/' characters.

Open HyperSkys opened this issue 1 year ago • 7 comments

I was attempting to make a plugin similar to world edit but when trying to make a command like //set it wouldn't do anything but when I ran it said Invalid Command.

HyperSkys avatar May 08 '24 05:05 HyperSkys

I see. Was this with Brigadier enabled?

Revxrsal avatar May 08 '24 15:05 Revxrsal

Yeah it was with Brigadier enabled.

HyperSkys avatar May 09 '24 02:05 HyperSkys

Does seem like it is an issue with Brigadier, just checked with it disabled and it worked just fine.

HyperSkys avatar May 09 '24 02:05 HyperSkys

I assume this line is the cause. Might need to double-check to see if input would even start with a / in normal commands or not. PR anyone?

Revxrsal avatar May 09 '24 15:05 Revxrsal

I assume this line is the cause. Might need to double-check to see if input would even start with a / in normal commands or not. PR anyone?

Seems like it is, you must've added a safety check out of instinct just incase someone thought it worked like you had to put a slash before it for a command.

HyperSkys avatar May 09 '24 22:05 HyperSkys

I assume this line is the cause. Might need to double-check to see if input would even start with a / in normal commands or not. PR anyone?

Never mind that didn't do a thing the issue still happens.

HyperSkys avatar May 09 '24 22:05 HyperSkys

I assume this line is the cause. Might need to double-check to see if input would even start with a / in normal commands or not. PR anyone?

Found the issue in the eval method in class BaseCommandDispatcher.java it throws the exception because the base command category could not be found.

HyperSkys avatar May 10 '24 03:05 HyperSkys