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 0

No comments.

jSdCool

(Unassigned)

Unconfirmed

(Unassigned)

25w35a

Retrieved