SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.07k stars 371 forks source link

Adding Suggestions: to custom skript commands. #3408

Open deathsou opened 4 years ago

deathsou commented 4 years ago

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)

APickledWalrus commented 4 years ago

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

Anarchick commented 4 years ago

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

Maybe a json format can be used ?

deathsou commented 4 years ago

priority: low 😭

APickledWalrus commented 4 years ago

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

JuceInUse commented 6 months ago

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)

Fusezion commented 6 months ago

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