triumph-cmds icon indicating copy to clipboard operation
triumph-cmds copied to clipboard

Automatically use the SenderMapper for arguments that have the same type.

Open BlitzOffline opened this issue 2 years ago • 0 comments

If there is a SenderMapper provided in the manager construction, it should maybe use that sender mapper to map arguments as well whenever possible and if not overridden by a CommandManager#registerArgument method.

Example, I create a BukkitCommandManager with the mapper being a SenderMapper<CommandSender, User>, whenever I have a parameter that's a User, and there's no argument registered for type User, it will attempt to pass the argument thru the mapper to see if it can get a sender. If not, do whatever it usually does like sending a message or whatever.

Also register default arguments for senders.

BlitzOffline avatar Aug 28 '22 02:08 BlitzOffline