All versions
1.1.0
Release
Better Enchant Commands 1.1.04 months ago 593
Compatibility
Minecraft: Java Edition
1.21.x
Platform
Fabric
Supported environments
Server-side
Client and server
Changes
Better Enchant Commands 1.1.0
A hardening + polish release. Every existing command still works the same way for valid input — this release is about making bad input safer and bulk operations more transparent.
Security
- Preset-name validation.
/enchantpreset save <name>and/enchantpreset delete <name>now require 1–64 characters ofA–Z,a–z,0–9,_, or-. Previously any non-whitespace token was accepted, which made unbounded disk growth and log-injection via crafted names possible. - Preset-level clamping on disk load. Preset entries read from the config file are now validated against
MIN_LEVEL..MAX_LEVEL(1..255). A hand-edited or corrupted config can no longer push an out-of-range level into item NBT. - Log-injection hardening.
AuditLoggerstrips ASCII control characters (newlines, tabs, ANSI escapes) from operator names, target names, labels, and config values before they reach SLF4J{}placeholders. Crafted scoreboard names can no longer forge or break lines in the audit log.
Correctness
- Modded enchantment IDs with colons.
EnchantmentParsernow splits on the last:in a token, so IDs likemymod:some:path:10parse correctly as namespace + path + level instead of being rejected with a confusing "too many parts" error. /enchantpreset applyempty-hand reporting. Previously, players in the selector with an empty main hand were silently skipped. They're now listed in the failure output, matching the pattern already used by/enchantand/unenchant.- Build fix. A pre-existing compile error (
IllegalArgumentException | CommandSyntaxException | RuntimeExceptionmulti-catch, which is invalid becauseIllegalArgumentExceptionextendsRuntimeException) is resolved, and twocreateItemStackcall sites that newly throwCommandSyntaxExceptionare properly handled.
Performance
- Cached
/repairlookups. The reflectivemendingandunbreakingholder lookups in/repairare cached per enchantment registry, so they only run once per server session instead of on every command invocation.
Added
ConfirmationManager.storeWithReplacement— an API variant callers can use to notify the operator when a prior pending confirmation is displaced. Not wired into any user-facing command yet, but available for downstream callers.
Unchanged
- Command surface, permission gates (op level 2), tab-completion behaviour, undo semantics, and preset JSON format are identical to 1.0.0.
- Compiled against 1.21 base, still compatible across all 1.21.x versions.
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:rh6kvpwJ:rWiVzNuF"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:rh6kvpwJ:rWiVzNuF"
}
