Skip to content

bans.json

Stores the server’s ban list. UUID-based — bans persist even if a player changes their name.

File: bans.json
Provider: HytaleBanProvider

The file contains a flat JSON array of ban objects:

[
{
"type": "infinite",
"target": "550e8400-e29b-41d4-a716-446655440000",
"by": "660e8400-e29b-41d4-a716-446655440000",
"timestamp": 1736942400000,
"reason": "Griefing"
},
{
"type": "timed",
"target": "770e8400-e29b-41d4-a716-446655440000",
"by": "660e8400-e29b-41d4-a716-446655440000",
"timestamp": 1736942400000,
"expiresOn": 1737028800000,
"reason": "Spamming"
}
]
TypeDescriptionDisconnect Message
infinitePermanent ban, never expires"You are permanently banned!"
timedExpires at a set time, auto-pruned on load"You are temporarily banned for <duration>!"

If a reason is set, " Reason: <reason>" is appended to the disconnect message.

FieldTypeDescription
typeString"infinite" or "timed"
targetUUIDBanned player’s UUID
byUUIDUUID of who created the ban
timestamplongEpoch milliseconds when the ban was created
reasonStringBan reason (optional)
expiresOnlongEpoch milliseconds when the ban expires (timed bans only)

Expired timed bans are automatically removed when the file is loaded and during connection checks.

The built-in HytaleBanProvider is not directly accessible from the mod API. For custom ban logic, register an AccessProvider or use PlayerSetupConnectEvent. See Access Control for the full API, including custom ban parsers and access providers.

CommandDescription
/ban <player> [reason]Permanently ban a player
/unban <player>Remove a ban

The /ban command always creates permanent bans. There is no built-in command for timed bans.

See Access Control Commands for details.