mojira.dev
MC-301735

Server Management Protocol Kick command parameter mis match

According to the information provided by the rpc.discover command, the kick command should require an array as input. This would be consistent with other similar commands.

  • Steps to reproduce the issue

  1. setup the Management protocol

  2. Attempt to send a kick command as described by the command discovery
    Kick parameters provided by discovery:

    "params": [
      {
        "name": "kick",
        "schema": {
          "items": {
            "$ref": "#/components/schemas/kick_player"
          },
          "type": "array"
        },
        "required": true
      }
    ]

Example payload that produces the error:

{"method":"minecraft:players/kick","id":0,"params":[[{"players":[{"name":"jSdCool"}],"message":{"literal":"kick test"}}]]}
  • Expected result

The target player is kicked from the server

  • Actual result

The following error is received due to the fact the server was expecting an object not an array

Invalid params: Not a JSON object: [{"players":[{"name":"jSdCool"}],"message":{"literal":"kick test"}}]

Environment

Windows 11 Home 24H2
32GB Ram
Ryzen 7 5800X CPU
java 21.0.7

Comments 4

Issue persists on 25w37a

Issue still exists on 1.21.9-pre1

The issue continues to occur on 1.21.9-pre2.

Still present on 1.21.9-pre3

jSdCool

Jonatan

Confirmed

Platform

Important

Dedicated Server

25w35a, 1.21.9 Pre-Release 1, 1.21.9 Pre-Release 2

1.21.9 Pre-Release 4

Retrieved