FlashyReese / CommandAliases

Alternate short commands for complex commands
MIT License
26 stars 6 forks source link

[Question/Request] SuggestionProvider #3

Closed supersaiyansubtlety closed 2 years ago

supersaiyansubtlety commented 3 years ago

Is there a way to create an alias for datapack disable "full/path/DataPack"?

I've tried string which doesn't autocomplete paths, and I've tried resource_location which doesn't accept a quoted argument (I don't know what arguments it accepts).

If not, could this be added?

FlashyReese commented 3 years ago

I've just looked into Vanilla's code, this requires a separate feature that is yet to be implemented. I don't have plans for it but I might consider it. Vanilla uses a plain string with a SuggestionProvider for this specific command.

supersaiyansubtlety commented 3 years ago

Would it be at all possible to make something like "arg::automatic#auto" that would infer the arguments that would be accepted when entering the execution command (the first that contains {auto} which should only be in one, users could specify other names for automatic arguments if they need multiple, sorry half of this comment is parenthesized)?

If so that might be easier/simpler than trying to cover lots of special cases.

FlashyReese commented 3 years ago

I don't think I can do that.

supersaiyansubtlety commented 3 years ago

Ok

FlashyReese commented 3 years ago

As of https://github.com/FlashyReese/CommandAliases/commit/ae3d3260bf4f5b3238ead21eafe736d2f2a0c9ba, you should be able to create a command redirect .

{
    "commandMode": "COMMAND_REDIRECT",
    "command": "dpd",
    "redirectTo": "datapack disable"
}
supersaiyansubtlety commented 3 years ago

sweet, I'll try that, thanks!

FlashyReese commented 2 years ago

0.9.0 should cover all the suggestions providers in vanilla. Closing as features is now complete.