1.0.1
Compatibility
Changes
New Features
-
New Commands:
/lock info: Displays detailed information about a locked container, including its owner, creation date, trusted players, and trusted groups./lock list: Provides a comprehensive list of all containers owned by the player, showing their location (X, Y, Z coordinates and world) and the date they were locked./lock transfer <player>: Allows the owner of a locked container to transfer its ownership to another player. All existing trusted players and groups are preserved during the transfer./trustgroup <groupname>: Enables the owner of a locked container to grant access to an entire group of players. Players belonging to the specified group (checked via Bukkit permissions:chestlock999.group.<groupname>) will be able to access the locked container./untrustgroup <groupname>: Revokes access for a previously trusted group from a locked container.
-
Configuration Options (via
config.yml):default-lock-on-place: A boolean option (true/false) that, when enabled, automatically locks containers (e.g., chests, barrels) as soon as a player places them.max-locks-per-player: An integer setting that limits the total number of containers a single player can lock across the server.notify-on-attempted-access: A boolean option (true/false) that, when enabled, sends a notification message to the owner of a locked container if an unauthorized player attempts to access or interact with it.lockable-blocks: A list of block types (e.g.,CHEST,TRAPPED_CHEST,BARREL,SHULKER_BOX) that the plugin recognizes as lockable. Only blocks specified in this list can be locked by players.
Improvements
-
Enhanced Lock Protection:
- Interaction Prevention: Locked blocks can no longer be opened, activated (e.g., levers, buttons), or otherwise interacted with by unauthorized players. This applies to all blocks defined as
lockable-blocksand currently locked. - Break Prevention: Unauthorized players are now prevented from breaking any locked block.
- Explosion Resistance: Locked blocks are now immune to destruction from explosions (e.g., TNT, creeper explosions).
- Piston Immunity: Locked blocks cannot be pushed or pulled by pistons, ensuring their immobility and security.
- Interaction Prevention: Locked blocks can no longer be opened, activated (e.g., levers, buttons), or otherwise interacted with by unauthorized players. This applies to all blocks defined as
-
Group-Based Permissions: Introduced the ability to trust entire groups of players to a locked container, simplifying access management for teams or factions.
-
Improved Error Handling & User Feedback: Enhanced messages to players for various scenarios, such as attempting to lock an un-lockable block, reaching the lock limit, or trying to access a locked container.
Bug Fixes
- Deprecated Method Usage: Replaced
player.getTargetBlock(null, 5)with the modernplayer.getTargetBlockExact(5)inLockCommandandUnlockCommandto ensure compatibility and best practices. ConcurrentModificationExceptionPrevention: Addressed a potentialConcurrentModificationExceptioninLockManager'strustanduntrustmethods by safely iterating over a copy of the lock collection.- Robust Player Checks: Improved checks for
OfflinePlayerinstances intrustanduntrustcommands to ensure that only players who have previously joined the server can be trusted or untrusted, preventing issues with non-existent player data. - Correct Lock Transfer Logic: Fixed the
/lock transfercommand to correctly preserve all existing trusted players and groups when transferring ownership of a lock, ensuring no data loss during the process.
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:sapl4dJP:YBJYxsvD"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:sapl4dJP:YBJYxsvD"
}

