Alternative command syntax, in the style of Essentials/EssentialsX
MattElek opened this issue · 5 comments
Most Essentials plugins/mods implement homes functionality a bit differently, in the form of
/home (tp to home)
/sethome (sets main home, with an optional name for other homes if allowed)
/delhome (deletes main home, with an optional name for other homes if allowed)
/homes (list homes)
As opposed to having all the commands as subcommands to /home, like this mod does.
I personally prefer the "classic" method of doing it, however, it ultimately comes down to your opinion and how you prefer it, but it would be nice if it was a config option to use "classic" home commands. Thanks for making and maintaining an awesome mod!
With the addition of the excluded_top_level_commands
config option in a5ace42, it is now trivial to create command redirects with CommandAliases to enable this behavior.
Here is a set of configs for the "classic" Essentials/EssentialsX command syntax for homes and warps:
- For CA < v1.0.0: essential_commands_home_and_warp-commandaliases.zip
- For CA >= v1.0.0 essential_commands_home_and_warp-commandaliases_1.0.0.zip
To use, set excluded_top_level_commands=[home,warp]
in config/EssentialCommands.properties
.
Then simply extract and place the json files in the config/commandaliases
directory, and things should work out of the box.
IMPORTANT NOTE: On CommandAliases 0.9.3
, aliases for EC commands fail to load at startup (An explicit /commandaliases reload
is required). This is resolved in ComandAliases 1.0.0
.
EDIT: as of CommandAliases 0.9.4
, EC aliases are correctly loaded at startup.
These changes will go out in release 0.27.0
.
Set of TOML configs for CommandAliases 1.0.0 (Not yet released) Edit: It's out!
essential_commands_home_and_warp-commandaliases_1.0.0.zip
I spent a bit of time trying to enable the excluded_top_level_commands=[home,warp]
on my server and I just realised that commit wasn't backported to 1.18.2.
It would be awesome if new commits could be backported to 1.18.2, or at least that one feature. I know it can be alot of work to maintain multiple versions of a mod for multiple minecraft updates, so its perfectly understandable if you don't want to. I might spend a bit of time to cherry pick that one commit from 1.19 to the 1.18 branch and make a pull request, if you don't want to spend time on it. Thanks for your time!
@rockbyo5 Thanks for the comment and PR! I think I have a working version on the 1.18
branch atm. Not 100% sure how I want to release that... version numbers are getting strange. That's a me problem though.
The artifacts from this build should have what you're looking for: https://github.com/John-Paul-R/Essential-Commands/actions/runs/3168855133
I made a CommandAliases (1.0.0) config for nicknames. It functions identically to Essential's /nick
. (well, it should...)
Note that the command will silently fail if anything goes wrong, since syntax errors aren't forwarded by CommandAliases (I think?)