Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Vanilla & Essentials overlapping commands and Tab Completions #2297

Closed
Zefferis opened this issue Dec 10, 2018 · 16 comments · Fixed by #2469
Closed

Issue with Vanilla & Essentials overlapping commands and Tab Completions #2297

Zefferis opened this issue Dec 10, 2018 · 16 comments · Fixed by #2469
Labels
status: not enough info Issues that require more information to be provided, either by the author or through investigation. type: question Questions regarding the use of EssentialsX.

Comments

@Zefferis
Copy link
Contributor

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:
  - []

commands.yml


Running:
Paper 1.13.2 b474
EssentialsX v2.15.0.56


Screenshots
alias: /give for /minecraft:give with essentials plugin and disabled essentials:give
image

Without the EssentialsX plugin:
image

@mdcfe
Copy link
Member

mdcfe commented Dec 10, 2018

This is addressed on the wiki's Common Issues page.

@mdcfe mdcfe added type: question Questions regarding the use of EssentialsX. status: not enough info Issues that require more information to be provided, either by the author or through investigation. labels Dec 10, 2018
@Zefferis
Copy link
Contributor Author

Zefferis commented Dec 10, 2018

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?

@mdcfe
Copy link
Member

mdcfe commented Dec 10, 2018

@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.

@Zefferis
Copy link
Contributor Author

Zefferis commented Dec 10, 2018

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?

@mdcfe
Copy link
Member

mdcfe commented Dec 11, 2018

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.

@Zefferis
Copy link
Contributor Author

Zefferis commented Dec 11, 2018

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

PaperMC/Paper#1733

Is this an actual issue with the way disabling commands is being handled?

@mdcfe
Copy link
Member

mdcfe commented Dec 11, 2018

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.

@pawjwp
Copy link

pawjwp commented Mar 29, 2019

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?

@Zefferis
Copy link
Contributor Author

@pawjwp

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 😆

@mdcfe
Copy link
Member

mdcfe commented Mar 30, 2019

@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.

@Zefferis
Copy link
Contributor Author

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 👍

@bcmpinc
Copy link

bcmpinc commented Nov 30, 2020

This issue still hasn't been fixed. Can it be re-opened?

@Chew
Copy link
Member

Chew commented Nov 30, 2020

Feel free to open a new issue, everything here is years old. Fill out the template completely as well.

@Peak123455
Copy link

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.

@bcmpinc

This comment was marked as off-topic.

@WHITECN2009

This comment was marked as off-topic.

@EssentialsX EssentialsX locked as off-topic and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: not enough info Issues that require more information to be provided, either by the author or through investigation. type: question Questions regarding the use of EssentialsX.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants