At minimum, additional check would be needed to determine if the alias was unique…
I can foresee this creating problems when using multiple datapacks (assuming the current layering is preserved); installation of a higher priority datapack with an alias identical to an existing alias could have all manner of odd effects.
Additionally, while aliases would be a convenience on an individual project, the presence of such would serve to 'ambiguate' the code for persons not familiar with the project.
Using aliases in an editor while creating the command code might be sufficienly usefull to merit adding, but the published/distributed code should use the full disambiguated forms.
Rollback Post to RevisionRollBack
WARNING: I have an extemely "grindy" playstyle; YMMV — if this doesn't seem fun to you, mine what you can from it & bin the rest.
To post a comment, please login or register a new account.
Basically, an alias is a kind of 1 command function that is an alias to that command.
It would work as part of a data pack
in world/datapacks/bar/data/foo/alias/gmc.mcalias
mcalias is a text file that contains a single command. (Or part of one)
For example:
(gmc.mcalias) Would have the text "game mode creative" in it. (no quotes)
When a player with this alias installed runs /gmc, they will go to creative mode.
If they run /gmc @a, this would be equivalent to /gamemode creative @a
If the name of the alias is an already existing command in vanilla Minecraft, it should send an error and ignore it. (give.mcalias = error)
The command can be an incomplete command
("/tellraw @a {") but must be completed by the user to avoid errors:
/foo "text":"hi"} = /tellraw @a { "text":"hi"}
There could also be some code that would determine whether a space should be added to the command or not if extra parameters are added.
YouTube: https://www.youtube.com/channel/UCzGDRYWcrGreMmQFo_d5N5Q
Facebook:https://goo.gl/s0r12d
Website:https://theusaf.weebly.com
JavaScript Projects: https://theusaf.github.io
Link Shortener: https://shortr.github.io
Twitter:https://www.twitter.com/theusafyt
At minimum, additional check would be needed to determine if the alias was unique…
I can foresee this creating problems when using multiple datapacks (assuming the current layering is preserved); installation of a higher priority datapack with an alias identical to an existing alias could have all manner of odd effects.
Additionally, while aliases would be a convenience on an individual project, the presence of such would serve to 'ambiguate' the code for persons not familiar with the project.
Using aliases in an editor while creating the command code might be sufficienly usefull to merit adding, but the published/distributed code should use the full disambiguated forms.
WARNING: I have an extemely "grindy" playstyle; YMMV — if this doesn't seem fun to you, mine what you can from it & bin the rest.