This plugin allows you to protect chests, doors, furnaces, dispensers, droppers, hoppers and many other blocks simply using signs. Once a sign is attached, only people listed on the sign can access the container. It uses no databases, all information is stored on sign attached to the protected block. So if you use WorldEdit to move a chest, the chest will still be protected.
Protect chest, doors, etc. simply by attaching a sign.
Doesn't need a database, the plugin just looks for attached signs.
Allow other players to access your protection.
Allow groups to access your protection.
Groups are defined using permission nodes, scoreboard teams, or using supported plugins like Factions and Towny.
UUID support
Players can change their names without losing access to their protected blocks.
Stores UUIDs on signs in an invisible way, so UUIDs are saved between server restarts.
Supports double doors and double chests (double trapped chests too): you only need one sign to protect both blocks.
Shows a message to players placing a chest, so that they know chests can be protected.
Automatically closes doors when a [Timer:X] tag is added, or when a default door close time has been specified in the config file.
Automatically let protections expire if the owner hasn't logged in for X numbers of days. (Disabled by default.)
Redstone support
Redstone contraptions cannot open protected doors, unless a [Redstone] tag is added.
Hoppers (minecart hoppers too!) cannot take or put items, unless a [Redstone] tag is added.
Update notifications
Server owners get notified when there is a BlockLocker update available.
The update checker works asynchronously, it will never block the server.
The update checker can of course be toggled off.
Configuration
Add extra blocks, for example TNT, levers or note blocks.
You can set that "attachable" blocks like levers can be protected by attaching a sign on the block the lever is attached on (no need to put signs on the lever itself!)
All messages can be translated.
Reload config files while the server is running using /blocklocker reload
Documentation (usage, configuration, permissions and commands) Please see
the documenation tab.
Bugs
If you have found a bug, please report it! You can report it here in in the forum thread, or on
Github. Please provide instructions for me how I can reproduce the bug. Please do not file bug reports in the review tab, as (a) bug reports aren't reviews and (b) the review section doesn't allow any interaction: you cannot reply there to any questions that I ask, so tracking down a bug is impossible.
Frequently asked questions (FAQ)
Can you add this feature? I'm still maintaining this plugin, but I've decided to no longer add features myself that I'm not personally interested in. If you would like a new feature, code it yourself! (Or ask someone else to code it for you.) Once you're done, a pull request on Github would be very much appreciated!
Some features that would be nice:
A permission node to allow people to view chests, but not to modify the contents of the chest.
Some way to let players add items to a certain chest, but not remove them.
Some features that wouldn't work:
A shop function to buy items from chests. This will quickly grow out of hand. It's better to code this as a separate plugin. For example, ChestShop (as of version 3.12) integrates with BlockLocker so that you can buy and sell items from your protected chests. This integration is possible because BlockLocker offers a simple API for other plugin authors to check if a chest is protected.
A command that shows all your protected chests. This would require keeping a database of all chests. Right now, all information is stored on the signs. Using a database would mean that copying chests to/from schematic files and moving them around with WorldEdit would no longer work correctly.
Limiting the number of chests of a player. This would also require keeping a database of all chests.
How do I change the color scheme of messages, [Private] and [More Users]? Open
plugins/BlockLocker/translations-en.yml (if you're using another language, open up that file instead) and add/remove color codes. For example
private: "&9[Private]" results in a blue [Private] tag. You can make it as advanced as you like, see for example
this website that generates color gradients.
Hoppers cannot put items into/take items from protected chests. How can I fix this? Add a line with the text [Redstone] or [Everyone] to the sign.
Hoppers can put items into/take items from protected chests. How can I fix this? This isn't caused by BlockLocker, but it's caused by setting
hopper.disable-move-event to
true in your
paper-global.yml file (in the config folder). If this is set to true, then plugins cannot react to item movement in hoppers anymore. So you need to set this to
false, there is no other workaround.
How can I disable the message that tells players how they can protect a chest? Open the
plugins/BlockLocker/translation-en.yml file (if you're using another language, open up that file instead) and set the
protection.chest_hint setting to two quotes:
"". The configuration file uses the YAML format, and those two quotes mean that the message is empty.
Are old Minecraft versions supported? It's not supported, but in practise it still works. And if it doesn't, just
download an older release of BlockLocker. You can use the following list to select the version number that you need:
Minecraft 1.20: use BlockLocker 1.12.1
Minecraft 1.18 and 1.19: use BlockLocker 1.12
Minecraft 1.14.4 to 1.17: use BlockLocker 1.11
Minecraft 1.14.0 to 1.14.3: use BlockLocker 1.6
Minecraft 1.13: use BlockLocker 1.5
Minecraft 1.12: use BlockLocker 1.3.4
Minecraft 1.9 to 1.11: use BlockLocker 1.3.3
Minecraft 1.8: use BlockLocker 1.2.0.0
Even older: BlockLocker didn't exist yet
I removed all doors/containers/attachables from the config file and ended up with an empty list. However, this doens't seem to have any effect. What can I do? YAML (the configuration file format used by most Spigot plugins) only accepts empty lists if you use a special format with a
[ and a
]. Like this:
protectableDoors: []
What are the differences between this plugin and LockettePro? This plugin uses no code from LockettePro. It was written from scratch. I have listed the major differences here, but there are many more smaller differences.
Both LockettePro and BlockLocker store the UUID of players on the sign, which is a good thing: the UUID data cannot get lost, even when you are using WorldEdit to move a sign. LockettePro stores UUIDs of players in the sign text as
Name#UUID, so for example
Notch#069a79f4-44e9-4726-a5be-fca90e38aaf5. It uses a protocol hack to hide the UUID. For this, the plugin requires ProtocolLib. BlockLocker stores the UUID in a hover text on the sign. Unlike for chat messages, signs never display their hover text, even if your mouse cursor is on the sign. Therefore, no protocol hack was needed to hide the UUID of players: Minecraft already hides this text.
LockettePro currently supports Vault groups, which BlockLocker doesn't. Instead, BlockLocker supports groups based on permission nodes: if you for example grant someone the permission node
blocklocker.group.myexample, then that player will belong to the group MyExample (case insensitive). Note that groups from Towny, SimpleClans and MassiveCraft Factions are supported in both plugins.
LockettePro has only rudimentary redstone support. You have to add
[Everyone] to your door for redstone to work. In BlockLocker
[Everyone] still works, but you can also add a
[Redstone] tag instead.
Hoppers are not well supported in LockettePro: either they never take items from protected containers, or always, depending on a configuration setting. BlockLocker allows you to add a
[Redstone] tag to allow hoppers. When no
[Redstone] (or
[Everyone]) tag is added, hoppers won't be able to place or take items from the container.
What are the differences between this plugin and the classic Lockette? This plugin uses no code from Lockette. It was written from scratch. I have listed the major differences here, but there are many more smaller differences.
Lockette has no real UUID support: it just looks up your old names. (UUIDs are cached as
Bukkit metadata, but not saved, so they are lost when the server restarts.) BlockLocker uses Bukkit PersitentDataHolder, which means that the data is stored safely inside the chunk and that editors like WorldEdit won't delete the UUID data.
Lockette has only rudimentary redstone support. You have to add [Everyone] to your door for redstone to work. In BlockLocker [Everyone] still works, but you can also add a [Redstone] tag instead.
Hoppers are not well supported in Lockette: either they never take items from protected containers, or always, depending on a configuration setting. BlockLocker allows you to add a [Redstone] tag to allow hoppers. When no [Redstone] (or [Everyone]) tag is added, hoppers won't be able to place or take items from the container.
Placing signs works a little different. In both plugins you can attach a sign to a container simply by right-clicking the container with a sign in your hand. The sign will be filled with [Private] on the first line and your name on the second line. In Lockette you can also place a sign next to a container. You have to manually type [Private] on the first line. Lockette will then move the sign so that it is attached to the chest. I find this behaviour not very useful, so it is not included in BlockLocker. For those cases where you want to add something to the third or fourth line of the sign, you can either edit the sign after placing it, or you can place the sign while sneaking, allowing you manually edit the sign.
I have another question. Please ask! The best place is here in the
discussion thread. You can also send me a PM, but keep in mind that others won't be able to benefit from any solution you found.