Issue with Vanilla & Essentials overlapping commands and Tab Completions
Zefferis opened this issue ยท 16 comments
Information
Full output of /ess version
:
[22:04:30 INFO]: Essentials version 2.15.0.56
[22:04:30 INFO]: Provides an essential, core set of commands for Bukkit.
[22:04:30 INFO]: Website: http://tiny.cc/EssentialsCommands
[22:04:30 INFO]: Authors: Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs, SupaHam and md678685
Server log:
https://gist.github.com/Zefferis/5b59c204c9f0bc8ee3ef61923ae30894
EssentialsX config
https://gist.github.com/Zefferis/d33f0b1186d625b4e89b40c53bd5d182
Help request
Problem
Commands are not completely disabled in config.yml, and by extention Tab Completion for vanilla /give
does not work properly after essentials:give has been disabled in an attempt to retain vanilla commands. (Similar effect with other overlapping commands with vanilla)
/give
seems to be assigned to essential's version of give- When the command is disabled in config.yml it completely disabled
/give
in-game instead of defaulting to the vanilla command - assigning
/give
to/minecraft:give
in commands.yml does not retain proper tab completion, instead it repeats an argument which is my username
Although the alias issue may be a separate bukkit/spigot/paper issue, EssentailsX is using commands that overlap with Vanilla, such as give, kill, enchant, list, kick, ect; when these commands are disabled in the config they don't default to vanilla in-game.
This leaves assigning it an alias in commands.yml; but that has the tab competition issue..
Is there a way for essentials to disable these vanilla overlapping commands and give those commands back to vanilla; ie:
allow me to use vanilla's /give
after essentials:give
has been disabled, without having to type /minecraft:give
in-game to retain proper tab completion.
What I have tried
I've gone into config.yml and added:
disabled-commands:
- give
went into commands.yml and added:
aliases:
essentials:give:
- []
Running:
Paper 1.13.2 b474
EssentialsX v2.15.0.56
Screenshots
alias: /give for /minecraft:give with essentials plugin and disabled essentials:give
The best solution is to just ditch essentials and install plugins that only provide the features you really need. That's what I went for and so far it works perfectly.
Also, I have experienced this issue before, And i tried everything and here the fixing to the issue, You may use /minecraft: or do /execute as @s run <minecraft commands> These works.
Well the question is I want some command in Essentials like /fly and /vanish and so on.But it overwrites the vanilla commands.So the condition is -- I have to keep it but I dont want to.It's just really annoying
Are there any plugins now to disable the overwrite action?
This is addressed on the wiki's Common Issues page.
I took a look at the Common Issue's wiki, but it doesn't fix tab completion unfortunately. The referenced #1384 from last year's solution was aliasing to another plugin's command; it's a similar issue, but this is a tad different. It's more so about disabled commands in config.yml rather than aliases.
Specifically it's about how Essentials is taking /give
away from vanilla commands and replacing it. When essentials' give is disabled it doesn't return to vanilla behavior (instead it disables /give
in-game unless you alias it to something else).
Because aliasing is the only remaining option to try to get vanilla /give
back without using /minecraft:give
, it's having strange tab completion issues (which may be related to spigot/paper instead of essentials) ((unless there's some strange way that the plugin interacts with alias tab completion with those [<args>]
So the question is more about if the overlapping vanilla commands that are overridden need to be overridden - I'm not seeing too many differences between 1.13 commands vs what EssentialsX is providing;
And since the current solution is aliasing, that's separate from how disabling commands is implemented.
I could skip disabling - give
in the config.yml if I aliased /give
to /minecraft:give
, but I lose tab completion in that process;
Is it possible for those commands that are disabled in config.yml to default to vanilla, or take a step down in priority if there's another plugin with the same command - instead of how it retains control of the disabled command but doesn't have any output?
@Zefferis Disabling commands in the config.yml
does not stop EssentialsX handling the command - instead, EssentialsX will simply not do anything if it ends up handling it. If you want to override commands, it's best to only use commands.yml
and not disabled-commands:
.
Spigot should redirect tab completion to whichever plugin has priority in commands.yml
, but disabling commands may prevent this working as intended.
Alright, thank you md!
It would be super nifty if essentialsX was able to just remove handling of specific commands; esp. since they overlap with vanilla -
I'll head over to Spigot and report the issue ๐
EDIT:
Spigot had this issue reported 2 years ago with https://hub.spigotmc.org/jira/browse/SPIGOT-2819
Still, I'm not seeing the real need for the vanilla override commands that Essentials is providing now that commands have been updated and have tab completions in 1.13.
Thoughts on removing essentials:give
& essentials:enchant
and the such?
These commands have been part of the upstream Essentials project and EssentialsX for years, and their behaviour is familiar to likely thousands of players and admins. There is no intention nor rationale for removing them.
In addition, CraftBukkit has had a command override system for years which has allowed you to specify how individual commands are handled, so adding a command disable feature to every plugin that exists would be unnecessarily complex while not achieving the intended effects.
Totally understandable;
A response I got from the paper github from a user was:
To me it looks like essentials should properly implement command disabling. It still registers the command, which is why tabcomplete is going through.
EDIT:
Here is how essentials handles disabled commands:
https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/com/earth2me/essentials/Essentials.java#L486
Is this an actual issue with the way disabling commands is being handled?
As stated before, disabled-commands
does not disable them in the sense of unregistering the command - it "disables" them by making said commands not do anything if EssentialsX is responsible for handling them (ie if no other plugin overrides them).
This was fit for the purposes of just making the commands not work, which made sense years ago before vanilla even had half of Essentials' commands. However, people now expect "disabling" a command to mean "unregister it from the server", which is:
- not an ideal approach just to fix tab completions,
- not what any experienced users will expect the feature to do, and
- doesn't solve the issue with most other plugins that might override vanilla commands.
In addition, EssentialsX also makes a conscious effort to hand over tab completion to other commands, but we can't do this with vanilla commands as they are not plugin commands.
Ideally, server software would provide a way to let vanilla commands take precedence, because doing this in EssentialsX would require an uncomfortable amount of tying behaviour to the implementation instead of the API.
Did you ever find a proper solution to this problem that addresses tab completion? I have recently switched to 1.13.2, which broke the tab completion in the commands.yml fix. You are the only person I have found that seems to have all the same problems I do. I need to be able to do more advanced things in commands than the essentials version offers, but I still want /warp, /home, and the essentials chat functions, did you ever find a solution?
I unfortunately did not. Neither Essentials nor Spigot/Paper have worked on this issue. I continue to work around it by using "/minecraft:" in-game to get my vanilla commands without aliases.
I'm glad I'm not the only one on this sinking ship though, it's nice to have company ๐
@pawjwp @Zefferis I've been looking into this recently.
So far, I've tried registering the permission to the command at runtime. This is currently the intended way for plugins to hide their commands from the autocomplete list.
The problem with this is that Bukkit will also check permissions before EssentialsX starts running the command, and won't let EssentialsX run the command if the player doesn't have permission. This has several downsides:
- EssentialsX won't be able to hand over conflicting commands to other plugins
- EssentialsX won't be able to use its built-in permissions handling
player-commands
won't work- Debug mode (
/ess debug
) won't include command permission checks unless they're successful
Ideally, Bukkit would just provide a way for us to hide commands from the tab list, but this doesn't seem to have happened yet. I may try and implement something like this on Paper, but this won't work on Spigot unless they provide an equivalent API.
Thank you for looking into it!
I hope it's something that can be integrated into Paper and Spigot/Bukkit later, your work is great, thank you for it ๐