command override no longer working?
mrcoffee1026 opened this issue ยท 12 comments
Weird issue involving the /ignore command which is fought over by at least one other plugin (GriefPrevention). I found the solution was to add the /ignore command to the override commands list in essentials, this seemed to allow Essentials to KEEP the command and use it as desired. As of the last build I installed here... I get an "Unknown command. Type "/help" for help." message come up instead. As a short term work around I made a /eignore alias which works... but I don't understand why /ignore is no longer working. Seems like
aliases:
eignore:
- "essentials:ignore $$1"
overridden-commands:
- ignore
EssentialsX version (/essentials
):
2.0.1-b550
Server software (/version
):
git-Spigot-549c1fa-70cc382 (MC:1.12.2)
Server (logs/latest.log):
EssentialsX config (if applicable):
relevant portion above
Could you try removing ignore
from the override commands list and aliasing it to essentials:ignore
? In addition, eignore
should already exist without the need to manually specify it in commands.yml
.
well I didn't have them COMBINED. Previously, I simply had ignore on the list of overrides. As I said, it stopped working.
Please post the actual console output when you run /ignore
from in game with /ess debug
enabled.
I tried this, and /ignore - set up as an alias - still results in "Unknown command". You are correct about /eignore? I wasn't aware this was automatic, from the documentation it seemed to suggest that I MUST set up an alias if another plugin had a command of the same name for that to work. Specifically:
# If you have two plugin with the same command and you wish to force Essentials to take over, you need an alias.
Anyway i got the idea that putting ignore on the override list would also be necessary if I didn't want to use /eignore but wanted /ignore to utilize the essentials:ignore function. Also, correct me if I'm wrong, but shouldn't the alias be essentials:ignore $$1-
Essentials automatically registers all commands with at least one alias, which is the command name prefixed with e
.
Don't combine commands.yml
aliases with EssentialsX command overrides - use one or the other to resolve command conflicts, otherwise you face the risk of Essentials not recognising the command. I would suggest using only commands.yml
, as this can be used to set aliases for commands from any plugin.
You need to restart your server after editing any CraftBukkit/Spigot configs to reload them.
Setting an alias for griefprevention:ignore
should disable the plugin-prefixed version of the command, but won't unregister the command.
The only suggestions I can make are to:
- Gradually remove all of your plugins except for EssentialsX, Vault and your permissions plugin until the issue stops occurring, then gradually readd plugins until the issue reappears; or
- Redownload the latest build of EssentialsX from the build server in case your jar is corrupted in some way.
We don't have enough information to help otherwise.
Actual output: is as though I did not even type in the command:
[22:53:22 INFO]: mr_coffee1026 issued server command: /ess debug [22:53:22 INFO]: [Essentials] attempting to charge user mr_coffee1026 [22:53:22 INFO]: [Essentials] calculated command (essentials) cost for mr_coffee1026 as 0 [22:53:22 INFO]: [Essentials] charge user mr_coffee1026 completed [22:53:25 INFO]: mr_coffee1026 issued server command: /ignore
Console output DOES NOT CONTINUE.
Response from game is
Unknown command. Type "/help" for help.
I have attempted further alterations to no avail. /eignore works as expected, but... /ignore will not register in any way shape or form or any plugin at all anymore. I was thinking that perhaps I was just misreading this portion of the text:
# If you have two plugin with the same command and you wish to force Essentials to take over, you need an alias.
# To force essentials to take 'god' alias 'god' to 'egod'.
When you came after me about making an alias that already existed... I realized I had this backwards. For a time I had been using this
ignore:
- "essentials:ignore $1-"
In commands.yml. This didn't work... but realizing I had this backwards, I've tried to do this as the documentation suggests:
ignore:
- "eignore $1-"
But this still does not work. I cannot use /ignore. I thought for a moment that it was GriefPrevention's command causing the foul up (even though I removed permissions to use that from everyone - including myself - reading the documentation about commands.yml suggested I should be able to avoid the conflict (if that's what the problem is) by doing this:
griefprevention:ignore:
- []
This effectively removes the command entirely... so the only /ignore left on the server... is the one handled by Essentials... it still can't take over the command for some reason. Again, this WAS working before... no need for any aliasing, just having this on the override command list accomplished everything it needed to. Typing /ignore resulted in essentials answering back with my ignore list. Did this for weeks, then quit as of b550. No amounts of aliasing seems to be able to put it back where it was though.
Just adding a little bit of extra information here.
There are 3 systems at play:
Essentials auto detection of other commands, with the attempt to auto unregister command clashes. Essentials assumes that if you install a plugin that uses /home, it should give up the command, and let the other plugin use /home, as essentials expects that in any clashes, you're probably trying to install a plugin that offers more features in that area. The 'overridden-commands' section of the config file let's you turn this off for individual commands.
Essentials automatic aliases:
Prior to bukkit supporting the concept of "plugin:command", I decided essentials should register all of it's commands under an additional alias, for example "/ehome", just in case you occasionally want to check the essentials version of a command, rather than use the default option on your server
Bukkit aliases:
When bukkit added aliases, this allowed you to definitively map commands, assuming the other offending plugin doesn't use dirty tricks to bind commands, such as abusing precommand events.
In these situations, you could bind aliases, to the 'ecommand', to force bukkit to prioritise the Essentials version. In these situations I would alias 'home' to 'ehome $1-'.
I am familiar with these three systems, particularly now... however this stopped working as advertised weeks ago, at least as far as "/ignore" is concerned. Putting ignore in the override-commands list has no effect. Binding "ignore" to eignore (the essentials version) also has no effect. Oddly, binding "ign" to eignore... works exactly as expected. In any case I cannot disable all other plugins and reenable them one at a time.... the other plugins are needed, as is Essentials. I installed nothing new prior to this issue coming up, so it seems due to a more recent build of Essentials I put on or a more recent build of Spigot, though why either would result in this behavior is unknowable to me. I reported the problem, I actually expected more people to have this problem or to have more command words be effected by the issue. But even I can't report an additional word to test with where one or two of the three systems you mentioned fail, so I'll have to use an alternate word to "ignore" to use the command if I want to use the Essentials one. I didn't have to before, so something changed, and that something is unlikely to be something not Essentials, but the only other plugins I have that do anything with "ignore" are just as... cough essential to the running of the server. (GriefPrevention and ChatControl are actually the only two... ChatControl actually lets me 'set' the word... so mine doesn't even use "ignore"... and GriefPrevention I simply can't shut off for any reason. However, putting the alias that I did should have taken it out of the picture.)
Personally I would probably try copying your plugins and config files locally (no need to download the world etc), and try running a server from your pc.
That way you could try and specifically isolate the problem. I'm not part of the EssentialsX development team (I did write the command override system and the documentation you reference in the original Essentials however), so I'm not sure if there were any secret recent under the hood changes...
Closing due to lack of response. If this is still a problem, please try isolating plugins as suggested above on a replica test server, then let us know what results you come back with.
Yeah (keep closed), although I did figure this out later due to a similar problem I had with /me when ChatControlPro added the command. In the config it lets you set the alias for the commands for /me and /ignore as well as disabling them in that plugin... to be SUPER SURE there would be no conflict, I BOTH disabled them AND changed the alias from like... me to chcme and ignore to chcignore. Later the guy asked me to just... try disabling without the aliases changed and this fixed them both, allowing essentials to work as normal.