Minecraft.How
Chargement...
Passer au contenu

BanHammer

par Patbox

BanHammer is a server-side punishment utility for Fabric and Quilt that enables moderators to ban, mute, kick, or IP-ban players with customizable messages, silent punishment options, and support for SQLite or MySQL databases.

Notre résumé

Ce que fait ce projet

BanHammer

BanHammer is a server-side mod for Minecraft that provides moderators with tools to manage player behavior through bans, mutes, kicks, and IP-based restrictions. It operates exclusively on the server side and requires no client-side installation, making it suitable for deployment on Fabric and Quilt mod loaders.

Core Functionality

The mod allows moderators to issue permanent or temporary punishments using straightforward commands. Players can be banned, muted, or kicked with optional reasons, and IP-based bans are supported to restrict access by network address. Each punishment can be made silent by adding the -s flag before the reason, preventing public announcements while still enforcing the restriction.

Punishment durations are highly flexible, accepting time units in seconds (e.g., 15s), minutes (30m), hours (6h), days (7d), or years (1y), and can be combined (e.g., 2y3d4h5m). Temporary punishments automatically expire after the set duration unless modified or removed early.

Configuration and Storage

BanHammer stores all punishment data in either a SQLite or MySQL database. SQLite uses a local file (banhammer-sqlite.db by default) located in the server directory, while MySQL requires configuration of host, port, database name, username, and password. Admins can enable historical logging to retain records of all punishments in a separate table, even after they expire or are removed.

The mod includes a reloadable configuration system. Server administrators can update settings at runtime using the /banhammer reload command without restarting the server. Configuration options include toggling silent punishments by default, defining which commands are blocked for muted players (such as msg or me), and setting whether IP bans should also apply standard bans to associated accounts.

Permissions and Integration

Access to BanHammer’s commands is controlled through the Fabric Permissions API, ensuring compatibility with popular permission managers like LuckPerms and PlayerRoles. Each command has a corresponding permission node, allowing fine-grained control over who can execute actions such as /ban, /tempban, /mute, or /pardon. Default permission levels are configurable, and additional permissions like banhammer.duration.<entry> can be used to override temporary punishment duration limits on a per-user or per-group basis.

Messaging and Notifications

All user-facing messages are fully customizable via JSON files. In-game notifications can be edited in config/banhammer/messages.json, while Discord webhook alerts are managed in config/banhammer/discord-messages.json. These messages support dynamic variables such as ${operator} (moderator name), ${banned} (target player), ${reason}, ${expiration_date}, and ${expiration_time}. Discord messages can be formatted as rich embeds with customizable titles, colors, images, thumbnails, and fields.

Additional Features

The mod includes an import function (/banhammer import <source> [remove]) that allows administrators to transfer ban lists from other sources, optionally removing entries from the source after import. Here's the thing, server admins can also use the /pardon command to remove all active punishments from a player at once.

BanHammer is licensed under the GNU Lesser General Public License v3.0 and supports the following Minecraft versions: 26.3-rc-1, 26.3, 26.2, 26.1.2, 26.1.1, 26.1, 1.21.11, 1.21.11-pre3, 1.21.10, 1.21.9-rc1, and 1.21.9. It doesn't support client-side execution and is incompatible with Forge or NeoForge.

Réactions

Connecte-toi pour réagir.

Compatibilité

Versions et loaders

8 versions enregistrées

Galerie

BanHammer icon

Nous utilisons des cookies pour améliorer votre expérience. En continuant à utiliser ce site, vous acceptez notre utilisation des cookies. Lire notre politique de confidentialité