To send request, you need to send it like this:
"{\"type\": \"something\", \"password\": \"Password123\" }"
And the response is always:
{"error": false, "message": something }
Or if it is error then:
{"error": true, "cause": "etc.: wrong password" }
This is the list of supported types ( "{\"type\": \"here\", ...):
- start_listener (start event listener)
- end_listener (end event listener)
- command (execute command on server as console)
- make_playerOP (make specified player OP)
- player_kick (kick a specified player with reason)
- player_permanentBan (permanent ban a specified player with reason)
- player_permanentIpBan (-||- but ip ban)
- player_tempBan (temp ban for specified player with reason)
- player_tempIpBan (-||- but ip temp ban)
- get_ram (get server free, total and in-use memory. Two decimanl places)
- get_tps (get server's tick per seconds from 1m, 5m and 15m.)
- get_onlinePlayers (get list of online players)
- get_offlinePlayers (get list of offline players)
- broadcast (broadcast message, support & color codes)
- get_info (get all server info)
All punishment methods need aditional parameter
player and
reason. Example:
"{\"type\": \"player_kick\", \"player\": \"XAP3Y\", \"reason\": \"What a noob!\", \"password\": \"Password123\" }"
Response:
{"error":false,"message":"Player XAP3Y has been kicked with reason: What a noob!"}
Or when the player is not online, then the response would be:
{"error":true,"cause":"Player XAP3Y is not online!"}