Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Adding Suggestions: to custom skript commands.

Open deathsou opened this issue 5 years ago • 6 comments

After spending about an hour figuring out how to make suggestions to skript commands, and eventually making it so all my commands can have that integration, I wondered if it was not possible for Skript to handle that itself.

Here's how it could work: command /randomtestcommand <text>: arg-1 suggestions: "Test", "Test2", Test3" trigger: stuff

Is that feasible? I think it would be a great addition. (obviously you can do that in java, but many people don't have the ability to do that, like maybe me lol)

(sorry for the messed up code idk how to make it do a new line)

deathsou avatar Sep 26 '20 20:09 deathsou

I was thinking of implementing something like this at some point. I’ll mark this as an enhancement

APickledWalrus avatar Sep 26 '20 20:09 APickledWalrus

If it can help : https://github.com/lucko/commodore https://github.com/Mojang/brigadier

Maybe a json format can be used ?

Anarchick avatar Sep 26 '20 20:09 Anarchick

priority: low 😭

deathsou avatar Sep 26 '20 20:09 deathsou

If it can help : https://github.com/lucko/commodore https://github.com/Mojang/brigadier

Maybe a json format can be used ?

As of right now, we can't use Brigadier because Skript still supports 1.9 - 1.12

APickledWalrus avatar Sep 26 '20 20:09 APickledWalrus

Hello! I see this has been abandoned and would like to suggest again that it be added! This would make custom Skripts so much nicer! You could even define them more simply like this:

on load:
    loop 10:
        set {listVar::%loop-index%} to loop-index
  
command /foo <parameter> with suggestions {listVar::*}:

The above example would have 10 suggestions total (1-10)

JuceInUse avatar Apr 13 '24 03:04 JuceInUse

this technically hasn't been abandoned just not labled it has a pr at #6418

Fusezion avatar Apr 13 '24 03:04 Fusezion