MCPcopy Index your code
hub / github.com/MCBans/MCBans

github.com/MCBans/MCBans @5.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 5.2.0 ↗ · + Follow
920 symbols 2,862 edges 121 files 192 documented · 21%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MCBans Server Plugin

Author: Firestarthe, Syamn, Corpdraco

Welcome to MCBans

MCBans is a global banning solution for Minecraft, provided through the Bukkit plugin. The aim of the plugin is to provide server owners with a method of assisting in the prevention of griefers on their own and other's servers, using both local and global bans.

Helpful Information

Main Site: https://mcbans.com

Support Desk: https://forums.mcbans.com/support-tickets/open

Community: https://forums.mcbans.com

Expectations

Please remember the following things while using our plugin!

  • MCBans is maintained constantly by a team of staff, but we're not miracle workers! Like everyone, we need time to perform our tasks and can't do everything on demand.
  • MCBans isn't always 100% clear from invalid bans - but, we're well on our way. Your help is always thanked in removing invalid bans and we try our hardest to monitor everything.
  • MCBans has a small dedicated development team - We do only have a few dedicated developers, but they do have other commitments as well.
  • MCBans staff don't always have good memories! Visit our support desk.

Commands

Local Ban Variations * /ban - bans the player * /rban - rollback and ban

E.G. /ban Firestarthe breaking my sign

Global Ban Variations * /ban g - global ban * /gban - global ban * /rban g - rollback and global ban

E.G. /ban g Firestarthe griefing

Temporary Ban Variations * /ban t

E.G. /tban Firestarthe 15 m you are banned for 15 minutes

IP Ban Variations * /banip [reason] - bans an IP address

Misc Commands * /lookup - checks players ban history (local/global bans) * /banlookup - checks ban details * /altlookup - checks alt accounts (premium server only!) * /kick [reason] - kicks a player from the game * /unban - unbans the player/IP from your server * /mcbans - mcbans help and more information * /mcbs - change server settings

Permissions

  • mcbans.admin (default: op) - Admin privileges to mcbans
  • mcbans.ban.global (default: op) - Allow global ban player
  • mcbans.ban.local (default: op) - Allow local ban player
  • mcbans.ban.temp (default: op) - Allow temp ban player
  • mcbans.ban.rollback (default: op) - Allow use rban command
  • mcbans.ban.ip (default: op) - Allow use banip command
  • mcbans.ban.exempt (default: op) - Permission to exempt from bans
  • mcbans.unban (default: op) - Allow unban player
  • mcbans.view.alts (default: op) - Show notification of a players alts on connect
  • mcbans.view.bans (default: op) - Show previous ban information on player connect
  • mcbans.view.staff (default: true) - Show notification of a mcbans staff on connect
  • mcbans.hideview (default: false) - Hide player view alts/previous bans on connect
  • mcbans.lookup.player (default: op) - Allow lookup player ban history
  • mcbans.lookup.ban (default: op) - Allow lookup ban details
  • mcbans.lookup.alt (default: op) - Allow lookup alt account
  • mcbans.kick (default: op) - Allow kick player
  • mcbans.kick.exempt (default: op) - Permission to exempt from kicks
  • mcbans.maxalts.exempt (default: op) - Permission to exempt from max alt account disconnect

Docker Images and Kubernetes

This project includes Docker images for testing the MCBans API:

  1. mcbans-main: A simple test that connects to the MCBans API and verifies the connection
  2. mcbans-bantest: A more comprehensive test that bans a player, checks the ban status, and then unbans the player

Running with Kubernetes

A Kubernetes CronJob configuration is provided in kubernetes-jobs.yaml. This file defines two CronJobs that run every hour: - mcbans-main-cronjob: Runs the Main class to test API connectivity every hour - mcbans-bantest-cronjob: Runs the BanTest class to test ban functionality every hour

To apply the configuration to your Kubernetes cluster:

# Apply the configuration
kubectl apply -f kubernetes-jobs.yaml

# Check the status of the CronJobs
kubectl get cronjobs

# Check the status of the Jobs created by the CronJobs
kubectl get jobs

# View logs from a job pod (replace JOB_POD_NAME with the actual pod name)
kubectl logs JOB_POD_NAME

# Delete the CronJobs when done
kubectl delete -f kubernetes-jobs.yaml

You can customize the API key and other parameters by editing the args section in the YAML file before applying. You can also modify the schedule by changing the schedule field in the CronJob specification (default is "0 * * * *", which runs at minute 0 of every hour).

Extension points exported contracts — how you extend this code

DataReceived (Interface)
(no doc) [2 implementers]
src/main/java/com/mcbans/client/PlayerLookupClient.java
DataReceived (Interface)
(no doc) [2 implementers]
src/main/java/com/mcbans/client/BanLookupClient.java
JSONString (Interface)
The JSONString interface allows a toJSONString() method so that a class can change the behavio
src/main/java/com/mcbans/plugin/org/json/JSONString.java
CommandReceived (Interface)
(no doc)
src/main/java/com/mcbans/client/PendingActionSyncClient.java

Core symbols most depended-on inside this repo

append
called by 178
src/main/java/com/mcbans/plugin/org/json/JSONObject.java
getConfigs
called by 97
src/main/java/com/mcbans/plugin/MCBans.java
message
called by 96
src/main/java/com/mcbans/plugin/util/Util.java
info
called by 92
src/main/java/com/mcbans/plugin/ActionLog.java
send
called by 82
src/main/java/com/mcbans/plugin/commands/CommandMCBans.java
getServer
called by 75
src/main/java/com/mcbans/domain/models/client/Ban.java
isDebug
called by 72
src/main/java/com/mcbans/plugin/ConfigurationManager.java
length
called by 61
src/main/java/com/mcbans/plugin/org/json/JSONArray.java

Shape

Method 790
Class 121
Enum 5
Interface 4

Languages

Java100%

Modules by API surface

src/main/java/com/mcbans/plugin/org/json/JSONObject.java47 symbols
src/main/java/com/mcbans/plugin/commands/CommandMCBans.java30 symbols
src/main/java/com/mcbans/plugin/ConfigurationManager.java28 symbols
src/main/java/com/mcbans/plugin/org/json/JSONArray.java26 symbols
src/main/java/com/mcbans/plugin/events/PlayerBanEvent.java25 symbols
src/main/java/com/mcbans/banlist/BannedPlayer.java24 symbols
src/main/java/com/mcbans/domain/models/client/Ban.java20 symbols
src/main/java/com/mcbans/client/Client.java20 symbols
src/main/java/com/mcbans/plugin/events/PlayerTempBanEvent.java18 symbols
src/main/java/com/mcbans/plugin/MCBans.java18 symbols
src/main/java/com/mcbans/plugin/callBacks/BanSync.java16 symbols
src/main/java/com/mcbans/plugin/util/Util.java14 symbols

For agents

$ claude mcp add MCBans \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page