Skip to content

Commit

Permalink
protocol/command.go: Do not include dynamic enum values in enumValues()
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedAsylumMC committed Jun 21, 2023
1 parent 98d32b8 commit 10dedb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions minecraft/protocol/command.go
Expand Up @@ -395,6 +395,9 @@ func enumValues(commands []Command) (values []string, indices map[string]int) {
}
for _, overload := range command.Overloads {
for _, parameter := range overload.Parameters {
if parameter.Enum.Dynamic {
continue
}
for _, option := range parameter.Enum.Options {
if _, ok := indices[option]; !ok {
indices[option] = len(values)
Expand Down

0 comments on commit 10dedb8

Please sign in to comment.