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

Tab Completions #1548

Closed
ShaneBeee opened this issue Sep 19, 2018 · 12 comments
Closed

Tab Completions #1548

ShaneBeee opened this issue Sep 19, 2018 · 12 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Sep 19, 2018

Skript 2.3Alpha 3
Spigot 1.13.1

Im not sure if this is a Skript issue or a Spigot issue. But I noticed on 1.12.2 when you create a command, its recognized in the command list for completions.... IE:
If I create a command /blarg.... when I type /bl and hit tab, blarg shows up as one of the options.

In Skript 2.3 for 1.13, this does not seem to work.
If I fully type out the command /blarg it stays red, whereas commands like /skript will show up correctly in the completions.

IMAGES:
This image shows the completion working in 1.12.2

This image shows /blarg showing up as red and not showing completions when starting to type /bl

This image shows /skript showing up properly in the completions

@Nicofisi
Copy link
Member

Nicofisi commented Sep 19, 2018

I have no idea how Skript exactly registers commands, but FYI this method works (as per, this issue doesn't occur) on 1.13:

Bukkit.getServer().getCommandMap().register(pluginName, org.bukkit.command.Command)

with pluginName being the pluginname in /pluginname:command. No idea about the backwards compatibility though

Edit: enhancement since this doesn't really break anything, but medium priority since this sounds extremely misleading for the players

@Nicofisi Nicofisi added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Sep 19, 2018
@ShaneBeee
Copy link
Contributor Author

ShaneBeee commented Sep 21, 2018

Okay I wanted to add some more findings to this.
I was telling @Pikachu920 more about this on Skript-Chat ... but here is something else I noticed to add to this topic.

I have a few scripts loaded on this test server, if in-game I do the command /skript and hit tab, the only things that show up are /skript:sk and /skript:skript

Now if I do the same in console, it shows ALL of my available scripts commands

Now as I mentioned to Pikachu after doing some further studying, I found out that when a player logs into a server, all available commands based on said players permissions are sent to the client.
So I get why they are sending to console, but what has me perplexed is why are they not sending to the client?!?!
I have tried 100 different ways of giving myself permissions for all sorts of things to see if the outcome would change, and it never does.

This may not seem like a big deal to some people, but for me it is, as the players on my server will not be able to quickly/easily see the available commands I have made for them.

Thanks for reading!

@Nicofisi
Copy link
Member

Interestingly enough Skript already uses the method I sent already 👀

commandMap.register("skript", bukkitCommand);

No idea why it doesn't work for Skript

Could you please try on Paper 1.13.1? I'm sure this worked for me on Paper 1.13.1... https://destroystokyo.com/ci/job/Paper-1.13/lastSuccessfulBuild/

Weird, anyway

@ShaneBeee
Copy link
Contributor Author

Hey
Just tried it on paper, and got the exact same results!

@bensku
Copy link
Member

bensku commented Oct 3, 2018

It appears that tab completions are based on plugin.yml and sent to client when it connects to server. Script command completions may or may not be possible to implement using current Spigot APIs.

@Nicofisi
Copy link
Member

Nicofisi commented Oct 3, 2018

Interestingly I don't have the commands in the plugin.yml of my plugin at all either.. hmm..

@melinstagibson
Copy link

same issue here. idk if ild classify this as medium priority, its awful to use any custom skript command like this. especially in comparison to every other plugin on 1.13. It wont even suggest online players by default which makes it kinda unusable for players

@TheBentoBox
Copy link
Member

I'm open to more opinions but I disagree. This certainly isn't insanely high priority when there's bugs that exist which are nearly plugin-breaking (such as the lack of support for new WG). Medium is higher than most things get and saying it's "awful" or "unusable" is a huge stretch when it's a simple loss of convenience. The commands still work fine.

@melinstagibson
Copy link

melinstagibson commented Oct 4, 2018

idk i have alot of commands handled via skript and its painful. you have to spell out the name on every command if its a larger server because otherwise you risk targeting the wrong player. and now add nicknames to the mix. That sucks compared to 1.13s current tabcomplete system which is kinda good imo and i actually had to go back to other plugins because my players rioted.
just my 2 cents but for me this makes skript unusable for commands

@TheBentoBox
Copy link
Member

I'm not inclined to put something that is simply an inconvenience which doesn't actually break anything as a high or critical priority. I get that it's annoying but we're still in alpha and "unusable" is very dramatic. There are other issues which cause actual problems of much higher relevance than "it takes longer to write commands".

I'd like to see others (preferably a dev) disagree with me before I change the priority, but medium is already higher than we put almost anything that's a pure inconvenience. Obviously we'd love to support the new command library but there is simply much more important stuff to do.

@ShaneBeee
Copy link
Contributor Author

I have to agree with @TheBentoBox here. Medium priority seems like a good fit.
The fact that this issue is simply an inconvenience vs a high priority but, it just makes sense to set it as medium.

As for @melinstagibson ... version 2.3 Alpha's 1-4 are simply meant for finding bugs.
" i actually had to go back to other plugins because my players rioted." - Are you using this on a production server? The release notes clearly state not to do that as its full of bugs!

Back to you Bento and the rest of the dev team. I just started learning Java and I have to admit its a HUGE pain in the rear dealing with tab completions. I would assume there probably isn't a "simple" way to add tab completions into Skript.

As for the completions themselves that I believe has never been handled by Skript.
The command itself doesn't seem to be registered, so for me, that is the part I hope gets fixed. I guess you could call it an inconvenience but the part that is confusing is when a player starts to type a command that I have created it just shows up as red, like it doesn't exists. That is super confusing to the player because then their first assumptions are either the command doesn't exist or they dont have permission for it!

@bensku
Copy link
Member

bensku commented Oct 6, 2018

If you, for example, implemented a chat system with Skript, this would indeed be quite serious issue. Too bad that I still have no idea how to get tab completions for dynamically registered commands. Actually, I'm not sure if it is feasible - that is, possible without diving deep into NMS/Brigadier code.

@bensku bensku added the completed The issue has been fully resolved and the change will be in the next Skript update. label Oct 9, 2018
@bensku bensku closed this as completed Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

5 participants