Multiple optional command arguments break Brigadier parsing · Issue #8889 · SkriptLang/Skript · GitHub
Skip to content

Multiple optional command arguments break Brigadier parsing #8889

Closed

Description

@ahmadmsaleem

Skript/Server Version

[22:49:47 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[22:49:47 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[22:49:47 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[22:49:47 INFO]: [Skript] Server Version: Paper 26.2 #126 (c646faf)
[22:49:47 INFO]: [Skript] Skript Version: 2.17.0-pre1 (skriptlang-github)
[22:49:47 INFO]: [Skript] Installed Skript Addons: 
[22:49:47 INFO]:  - skNetwork v1.1.0
[22:49:47 INFO]:  - skLambda v1.6.0 (https://github.com/ahmadmsaleem/skLambda)
[22:49:47 INFO]:  - DiSky v4.29.0
[22:49:47 INFO]:  - skript-particle v1.4.1 (https://github.com/sovdeeth/skript-particle)
[22:49:47 INFO]:  - skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
[22:49:47 INFO]:  - SkBee v3.26.0 (https://github.com/ShaneBeee/SkBee)
[22:49:47 INFO]: [Skript] Installed dependencies: 
[22:49:47 INFO]:  - WorldGuard v7.0.19+2400-f395a16
>

Bug Description

When a command has multiple optional arguments one after another, the later optional argument is not parsed correctly.

For example, this does not work:

command /getlint (lint|golden|star|blood) [<amount: integer>] [<player: player>]:
    trigger:
        send "%arg-1%, %arg-2%, %arg-3%"

Expected Behavior

The command should accept the second optional argument when the first optional argument is also provided.

works

command /getlint (lint|golden|star|blood) [<amount: integer> [<player: player>]]
command /getlint (lint|golden|star|blood) [<amount: integer> <player: player>]

doesn't work

command /getlint (lint|golden|star|blood) [<amount: integer>] [<player: player>]

Steps to Reproduce

command /getlint (lint|golden|star|blood) [<amount: integer>] [<player: player>]:
    executable by: players
    usage: commandUsage("/getlint <lint|golden|star|blood> [amount] [player]")
    permission: orb.admin
    suggestions:
        set {_type} to choice arg
        set the suggestions for arg-1 to commandSuggestedValues("getlint", 2, {_type}, "integer")
        set the suggestions for arg-2 to commandSuggestedValues("getlint", 3, {_type}, "player")
    trigger:
        set {_commandInputs::*} to choice arg, ({_amount} ? false) and ({_player} ? false)
        commandRun_getlint(player ? false, sender, {_commandInputs::*})

Errors or Screenshots

Image Image Image Image

Sovde testing images

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Activity

  1. skriptlang-automation commented on Oct 2, 2026

    @skriptlang-automation
  2. added
    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.
    priority: highIssues with potentially high impact that could be harmful to users.
    and removed
    needs triageAn issue that hasn't been classified or verified yet
    on Oct 2, 2026
  3. added
    PR availableIssues which have a yet-to-be merged PR resolving it
    feature-readyA PR/issue that has been approved, tested and can be merged/closed in the next feature version.
    patch-readyA PR/issue that has been approved and is ready to be merged/closed for the next patch version.
    and removed
    feature-readyA PR/issue that has been approved, tested and can be merged/closed in the next feature version.
    patch-readyA PR/issue that has been approved and is ready to be merged/closed for the next patch version.
    on Oct 2, 2026
  4. added
    completedThe issue has been fully resolved and the change will be in the next Skript update.
    and removed
    feature-readyA PR/issue that has been approved, tested and can be merged/closed in the next feature version.
    PR availableIssues which have a yet-to-be merged PR resolving it
    on Oct 13, 2026
  5. moved this from Awaiting Merge to Done - Awaiting Release in 2.17 Releaseson Oct 13, 2026
  6. moved this from Done - Awaiting Release to Done - Released in 2.17 Releaseson Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.completedThe issue has been fully resolved and the change will be in the next Skript update.priority: highIssues with potentially high impact that could be harmful to users.

Type

No type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions