API Reference
Punishments
Bans, mutes, warns, kicks + IP punishments
/api/plugin/punishments/create Issue a punishment by UUID
Bans, mutes, warns or kicks a player by UUID. durationMs null is permanent; ipBased also covers the player's last-known IP.
Request body
{
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"ipBased": false,
"issuerUuid": "string",
"issuerName": "string"
} Responses
-
200OK. -
400Bad Request
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
} Request
curl -X POST http://localhost:8090/api/plugin/punishments/create \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerUuid":"string","playerName":"string","type":"string","reason":"string","durationMs":0,"ipBased":false,"issuerUuid":"string","issuerName":"string"}'// Ban by UUID. durationMs = null is permanent; ipBased also bans the IP.
hive.punishments().createPunishment(
targetUuid, targetName, PunishmentType.BAN, "Cheating",
null, false, issuerUuid, issuerName)
.thenAccept(p -> { /* p.getId(), p.isActive() */ }); /api/plugin/punishments/create-by-name Issue a punishment by username
Same as create, keyed by username for when the target is offline and no UUID is at hand.
Request body
{
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"ipBased": false,
"issuerUuid": "string",
"issuerName": "string"
} Responses
-
200OK. -
400Bad Request
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
} Request
curl -X POST http://localhost:8090/api/plugin/punishments/create-by-name \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerName":"string","type":"string","reason":"string","durationMs":0,"ipBased":false,"issuerUuid":"string","issuerName":"string"}'// Issue against a name when the target isn't online to resolve a UUID.
hive.punishments().createPunishmentByName(
"Griefer", PunishmentType.MUTE, "Spam",
3_600_000L /* 1h */, false, issuerUuid, issuerName); /api/plugin/punishments/create-ip Issue an IP-only punishment
Punishes an IP with no associated player (ban-evasion ranges). A null/blank IP is a graceful no-op (204).
Request body
{
"ipAddress": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"issuerUuid": "string",
"issuerName": "string"
} Responses
-
200Created. Returns 204 when the IP was blank (no-op). -
400Bad Request
Request
curl -X POST http://localhost:8090/api/plugin/punishments/create-ip \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ipAddress":"string","type":"string","reason":"string","durationMs":0,"issuerUuid":"string","issuerName":"string"}'// Ban an IP with no associated player (e.g. ban-evasion ranges).
hive.punishments().createIpOnlyPunishment(
"203.0.113.7", PunishmentType.BAN, "Ban evasion",
null, issuerUuid, issuerName); /api/plugin/punishments/ip Record a player's current IP
Stores a player's current IP so IP-based punishments can match them. No body returned.
Request body
{
"playerUuid": "string",
"playerName": "string",
"ipAddress": "string"
} Responses
-
204IP recorded. -
400Bad Request
Request
curl -X POST http://localhost:8090/api/plugin/punishments/ip \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerUuid":"string","playerName":"string","ipAddress":"string"}'// Record a player's current IP so IP-based bans can match them.
hive.punishments().updatePlayerIp(playerUuid, playerName, "203.0.113.7"); /api/plugin/punishments/player-name/{name} List a player's punishments by name
Returns punishments for a username. activeOnly=true (default) filters to currently-effective ones.
Parameters
-
namestring path requiredUsername.
-
activeOnlyboolean query
Responses
-
200OK.
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X GET http://localhost:8090/api/plugin/punishments/player-name/{name}?activeOnly=0 \
-H "X-Hive-Api-Key: $HIVE_API_KEY"hive.punishments().queryByName("Griefer", true /* activeOnly */)
.thenAccept(list -> { }); /api/plugin/punishments/player-name/{name}/history Punishment history by name
All punishments for a username including expired/revoked, newest first, paginated.
Parameters
-
namestring path requiredUsername.
-
limitinteger query -
offsetinteger query
Responses
-
200OK.
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X GET http://localhost:8090/api/plugin/punishments/player-name/{name}/history?limit=0&offset=0 \
-H "X-Hive-Api-Key: $HIVE_API_KEY"hive.punishments().historyByName("Griefer", 25 /* limit */, 0 /* offset */)
.thenAccept(history -> { }); /api/plugin/punishments/player/{uuid} List a player's punishments by UUID
Returns punishments for a UUID. activeOnly=true (default) filters to currently-effective ones.
Parameters
-
uuidstring path requiredPlayer UUID.
-
activeOnlyboolean query
Responses
-
200OK.
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X GET http://localhost:8090/api/plugin/punishments/player/{uuid}?activeOnly=0 \
-H "X-Hive-Api-Key: $HIVE_API_KEY"hive.punishments().queryForPlayer(playerUuid, true /* activeOnly */)
.thenAccept(list -> { /* active punishments */ }); /api/plugin/punishments/player/{uuid}/history A player's full punishment history
All punishments for a UUID including expired/revoked, newest first, paginated.
Parameters
-
uuidstring path requiredPlayer UUID.
-
limitinteger query -
offsetinteger query
Responses
-
200OK.
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X GET http://localhost:8090/api/plugin/punishments/player/{uuid}/history?limit=0&offset=0 \
-H "X-Hive-Api-Key: $HIVE_API_KEY"hive.punishments().queryForPlayer(playerUuid, false /* include expired */)
.thenAccept(history -> { }); /api/plugin/punishments/query Query punishments by player and/or IP
Matches on playerUuid and/or ip (alt-account sweeps). activeOnly defaults to true.
Parameters
-
activeOnlyboolean query -
ipstring query -
playerUuidstring queryOptional player UUID filter.
Responses
-
200OK.
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X GET http://localhost:8090/api/plugin/punishments/query?activeOnly=0&ip=value&playerUuid=value \
-H "X-Hive-Api-Key: $HIVE_API_KEY"// Match by player and/or last-known IP (alt-account sweeps).
hive.punishments().queryForPlayerAndIp(playerUuid, "203.0.113.7", true)
.thenAccept(list -> { }); /api/plugin/punishments/remove Revoke a punishment by id
Lifts a single punishment. The actor is recorded as who revoked it.
Request body
{
"punishmentId": 0,
"actorUuid": "string",
"actorName": "string",
"reason": "string"
} Responses
-
200OK. -
400Bad Request
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
} Request
curl -X POST http://localhost:8090/api/plugin/punishments/remove \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"punishmentId":0,"actorUuid":"string","actorName":"string","reason":"string"}'// Revoke a single punishment by id (the actor is who lifted it).
hive.punishments().removePunishment(punishmentId, actorUuid, actorName, "Appeal granted"); /api/plugin/punishments/unban-by-name Unban all active bans for a name
Revokes every active ban for a username; optionally also unbans their last-known IP.
Request body
{
"playerName": "string",
"alsoUnbanLastIp": false,
"actorUuid": "string",
"actorName": "string",
"reason": "string"
} Responses
-
200OK. -
400Bad Request
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X POST http://localhost:8090/api/plugin/punishments/unban-by-name \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playerName":"string","alsoUnbanLastIp":false,"actorUuid":"string","actorName":"string","reason":"string"}'hive.punishments().unbanByName("Griefer", true /* also unban last IP */,
actorUuid, actorName, "Appeal granted"); /api/plugin/punishments/unban-ip Unban an IP
Revokes every active ban on an IP address.
Request body
{
"ipAddress": "string",
"actorUuid": "string",
"actorName": "string",
"reason": "string"
} Responses
-
200OK. -
400Bad Request
[
{
"id": 0,
"playerUuid": "string",
"playerName": "string",
"type": "string",
"reason": "string",
"durationMs": 0,
"expiresAt": 0,
"ipBased": false,
"active": false,
"ipAddress": "string",
"issuerUuid": "string",
"issuerName": "string",
"issuedAt": 0
}
] Request
curl -X POST http://localhost:8090/api/plugin/punishments/unban-ip \
-H "X-Hive-Api-Key: $HIVE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ipAddress":"string","actorUuid":"string","actorName":"string","reason":"string"}'hive.punishments().unbanIp("203.0.113.7", actorUuid, actorName, "Lifted");