Hi guys, I have a seemingly simplistic question that I can't seem to work out with the documentation of Spigot and Paper at hand.
My plugin registers its own
I need to either A) Fully disable unnecessary commonly named command implementations from a third party plugin or B) Give my plugin's commands precedence over commands with the same primary command label. I looked into other solutions for this problem and I only found people telling admins to use Skript or another plugin.
The next place I looked was within the
Perhaps I should detect the problematic plugins in my plugin's startup code and disable known problematic commands in a manual programmatic fashion if they are present.
The commands.yml alternative I tried was to point
Anyone have a quick fix that I'm missing to give my commands precedence or alternatively a recommendation for how to disable a problematic plugin's overriding command? Thanks for anyone who is giving this a shot.
My plugin registers its own
/heal
and /remove
commands which are being overridden by WorldGuard and FastAsyncWorldEdit respectively. I dove into the documentation for these two plugins and found no ability to disable these commands within their respective plugins. I need to either A) Fully disable unnecessary commonly named command implementations from a third party plugin or B) Give my plugin's commands precedence over commands with the same primary command label. I looked into other solutions for this problem and I only found people telling admins to use Skript or another plugin.
The next place I looked was within the
commands.yml
file where I found a semi-solution with the aliases section. Forcing heal
to point to myplugin:heal
works except now I have a long-winded command label which shows up in help text. I could hard code to exclude this plugin prefix from my help text system, but I figure there must be a more elegant solution where I can disable the third party plugin's command. Perhaps I should detect the problematic plugins in my plugin's startup code and disable known problematic commands in a manual programmatic fashion if they are present.
The commands.yml alternative I tried was to point
fastasyncworldedit:remove
and worldguard:heal
to - []
, which caused a bizarre result where the former responds with Unknown command
and the latter is seemingly unaffected by the change.
YAML:
aliases:
# This works but causes some gross command labels
heal:
- myplugin:heal
remove:
- myplugin:remove
# This causes weird results. Seems to not have intended effect. Am I doing this wrong?
fastasyncworldedit:remove:
- []
worldguard:heal:
- []
Anyone have a quick fix that I'm missing to give my commands precedence or alternatively a recommendation for how to disable a problematic plugin's overriding command? Thanks for anyone who is giving this a shot.