Revxrsal / Lamp

A powerful, extendable, flexible yet simple to use commands annotation framework.
MIT License
171 stars 33 forks source link

Cannot have commands with '/' characters. #96

Open HyperSkys opened 2 months ago

HyperSkys commented 2 months ago

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.

Revxrsal commented 2 months ago

I see. Was this with Brigadier enabled?

HyperSkys commented 2 months ago

Yeah it was with Brigadier enabled.

HyperSkys commented 2 months ago

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

Revxrsal commented 1 month ago

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?

HyperSkys commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.