Rollczi / LiteCommands

☄️ LiteCommands - Command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom, Sponge, Fabric, JDA and future implementations.
https://docs.rollczi.dev/
Apache License 2.0
147 stars 21 forks source link

GH-310 Relax input restrictions on quoted strings #314

Closed huanmeng-qwq closed 12 months ago

huanmeng-qwq commented 12 months ago

Quoted strings should be an optional input method, rather than being able to only use " to input after the developer has defined annotations

@Command(name = "quoted")
class QuotedCommand {
    @Execute
    fun base(@Arg @Quoted arg: String) {
        /*
        /quoted 123
        arg = "123"

        /quoted "2345
        arg = "2345"

        /quoted "12345"
        arg = "12345"

        /quoted "12345 678
        arg = "12345 678"                        
        */
    }
}
Rollczi commented 12 months ago

Thanks @huanmeng-qwq ❤️