Tags
Creators
Details
Licensed MIT
Published last year
Updated last month
All versions
4.0.1
Release
BS-BanHammer 4.0.15 months ago 237
Compatibility
Minecraft: Java Edition
26.2
26.1.x
Platforms
Folia
Paper
Purpur
Changes
[4.0.1] - 2026-06-03
π Bug Fixes
Jail System
- Fixed jail escape via relogging β jailed players are now re-enforced on join (
JailListener#onJoinβJailManager#restoreJailOnJoin): the enforcement cache is rebuilt on every join (even within the offline-cleanup window) and restoration also works without a database (the periodic cleanup keeps active jails in memory when no DB is configured). Previously the cache was cleared on quit and never restored, so a player could leave jail simply by reconnecting. - Fixed jails not surviving server restarts β
loadJailedPlayers()now runs ininitializeDatabaseDependentComponents()after the (asynchronous) database is ready, instead of duringonEnablewhen it was stillnull. /unjailnow works for offline players β the database record is released even when the target is not online (previously rejected outright).- Fixed jail enforcement being blocked by the plugin's own teleports β
JailListener#onTeleportnow exemptsPLUGIN-cause teleports. Previously the plugin's own "teleport back into jail" (and, on Folia, the initial jailing teleport) was cancelled by the very teleport-prevention handler, so a jailed player could leave the jail radius and never be pulled back. - Temporary jails now auto-release without a database β
JailManagertracks an in-memory expiry as a fallback when no database is configured. With a database theUnbanSchedulerremains the sole authority, so there is no duplicate handling or leaked entry. - Fixed return-location being clobbered on re-jail β the pre-jail location is now saved with
putIfAbsent, so restoring a jail (relog/restart) no longer overwrites the player's real return location with the jail spot.
Essentials Integration
- Essentials is now always preferred when hooked β when Essentials is present, jails are created and managed in Essentials; the built-in jail system is no longer used as a fallback in that case.
- Auto-creates an Essentials jail when none exists β if Essentials is hooked but no jail has been configured, BanHammer registers its configured jail location as an Essentials jail (via
setJail) instead of falling back to the built-in system. An existing, admin-configured Essentials jail is preferred when present. - Cell selection for
/jailβ new syntax/jail <player> <duration> [cell] [reason]. The optionalcelltargets a specific Essentials jail; when omitted, the configurable default cell is used. Tab-completion suggests existing cells, and a non-existent cell is rejected with the list of available ones. The hammer and reason-only commands use the default cell. Case-insensitive cell matching. /jailno longer requires a built-in jail location when Essentials is hooked β the location now comes from Essentials.
Configuration
- New
punishmentTypes.jail.useEssentialstoggle β enable/disable the Essentials jail hook from the config (defaulttrue). Whenfalse, BanHammer always uses its built-in jail even if Essentials is installed. Applies on (re)start. - New
punishmentTypes.jail.essentialsDefaultJail(default"1") β the Essentials cell used by the hammer and by/jailwhen no cell is specified.
Punishments / IP Bans
- Fixed IP-ban removal with anonymization enabled β
/unbanno longer attempts to pardon an anonymized IP. The real IP is only pardoned whenprivacy.ipAnonymization: NONE; otherwise a hint to use the vanilla/pardon-ipis logged. Applied to both manual unban and the auto-unban scheduler. - Muted players can no longer bypass chat blocking via namespaced commands (e.g.
/minecraft:msg).
Presets
- Fixed memory leak β per-player preset selections are now cleared on quit.
- Thread-safety β preset lists are immutable snapshots swapped atomically on reload, preventing a possible
ArithmeticException(modulo by zero) if a player cycled presets during/bh reload. - Modernized sound resolution β new registry-based
Soundsutility resolves both namespaced keys (block.note_block.pling) and legacy constants (BLOCK_NOTE_BLOCK_PLING), removing the deprecatedSound.valueOfwarnings.
Stability / Logging
- Removed noisy
INFO-level debug logging from the jail, hammer-use, ban and Discord code paths (nowdebug). ModrinthUpdateCheckershared fields (latestVersion,downloadUrl,changelogUrl,lastCheck) are nowvolatilefor correct visibility between the async check and the main thread.GUIListenerno longer risks aNullPointerExceptionon inventory items without a display name.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:odcCYmcd:XRMUCaTZ"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:odcCYmcd:XRMUCaTZ"
}

