Ban System

Create a professional moderation system with ban commands that include reasons and notifications.

What is a Ban System?

A ban system lets moderators quickly remove disruptive players with documented reasons. This example includes:

Setup Instructions

Step 1: Define Ban Patterns

Edit config/CommandMaker/syntax.json:

{
  "ban": {
    "pattern": "/ban <player> <reason>",
    "description": "Ban a player with a reason"
  },
  "unban": {
    "pattern": "/unban <player>",
    "description": "Unban a player"
  }
}

Step 2: Create Ban Aliases

Edit config/CommandMaker/aliases.json:

{
  "ban": "ban-ip ${ban_player} && say [BAN] ${ban_player} has been banned. Reason: ${ban_reason}",
  "unban": "pardon-ip ${unban_player} && say [UNBAN] ${unban_player} has been unbanned."
}

Step 3: Reload Configuration

/addcommand reload

Usage

Banning a Player

/ban Steve Griefing

Effect:

Unbanning a Player

/unban Steve

Effect:

Advanced: Temporary Bans

For temporary bans using schedule:

{
  "ban": "ban-ip ${ban_player} && say [BAN] ${ban_player} banned for: ${ban_reason} && schedule function my_namespace:unban_player 4320000t"
}

This would unban the player after 3 days (4,320,000 ticks)

Advanced: Ban Logging

Create a log of bans with custom variables:

/setcmdvariable ban_log "Ban Log: Check /say for history"
/addcommand add ban ban-ip ${ban_player} && say [BAN] ${ban_player} | Reason: ${ban_reason}

Ban Types Available

Ban Command Type Effect
ban <name> UUID-based Bans the player account
ban-ip <address> IP-based Bans the IP address (prevents alts)
pardon <name> UUID unban Unbans player account
pardon-ip <address> IP unban Unbans IP address

Reason Templates

Use consistent reason messages:

Griefing

/ban Player Griefing

Hacking/Cheating

/ban Player Unfair advantage / Hacking

Harassment

/ban Player Harassment of other players

Spam

/ban Player Spam / Advertising

Exploit

/ban Player Abuse of game mechanics

Moderation Best Practices

⚠️ Important

Bans are permanent until reversed. Always verify the correct player is banned before executing the command!

Enhanced Ban System

For more control, create a tiered system:

Temporary Mute (1 hour)

/mute Player && schedule function my_namespace:unmute_player 72000t"

Kick (No ban)

/kick Player "Kicked by staff"

Permanent Ban

/ban Player Serious violation - permanent

Integration with Chat Filter

Combine with custom syntax for auto-responses:

{
  "warn": {
    "pattern": "/warn <player> <reason>",
    "description": "Warn a player (first step)"
  }
}
{
  "warn": "say @${warn_player} has been warned: ${warn_reason}"
}