Usage
Placing signs
For containers (chests, furnaces, dispensers, etc.) it's easy: just place a sign against the block. BlockLocker will automatically add [Private] to the first line and your name to the second.
You can also place a sign while sneaking, this allows you to add some text to the third and fourth lines. You then need to write[Private] yourself on the first line. You can leave the second line empty, your name will automatically be placed here.
For doors, place a sign with [Private] on the first line against the block above the door. Placing a sign on the block below the door or even on the door itself works too, but looks less nice.
Trapdoors can be protected by placing a sign with [Private] on the first line against the block the trapdoor is attached to.
Editing signs
Right-click the sign and type /blocklocker <line number> <text> to replace the text on the given line. You can shorten this to /bl <line number> <text>.
Adding people to the sign
On the third and fourth row of the sign with [Private] you can add the names of up to two friends who may also access the chest. Want to add more people? Place a second sign against the chest. BlockLocker will add [More Users] to the first line and [Everyone] to the second line. If you want to change this, right-click the sign to edit it.
If the name of the person you're adding doesn't fit on the sign, just type as many characters as possible. If the person you're adding is currently online, BlockLocker will be able to complete the name.
If the person you're adding to the sign is currently offline, then just the name will be stored. Once someone interacts with the protection while that person is online, the UUID will be added.
Special tags
The tag [Everyone] grants everyone access to the protection. The tag [Redstone] grants hoppers access to the container, and allows redstone signal to open doors.
There's also a [Timer:X] tag, where X is a number from 0 to 9. Doors (trapdoors too) will close automatically after the specified amount of seconds. Use 0 to never close the door automatically. The timer tag overrides the default close timer setting the config.yml.
You can also add [MyGroup], which will grant all members of the group MyGroup access to the chest. See "Group support" below for what groups are supported.
Finally, you can also add +MyGroup+, which allows only the group leaders to access the sign. See again "Group support" below for more information.
Setup
Permissions
There's a very simple permission structure:
- blocklocker.protect - create new protections
- blocklocker.bypass - bypass all protections
- blocklocker.admin - edit (and remove) protections of other people.
- blocklocker.reload - use /bl reload to reload the configuration files
- blocklocker.group.groupName - adds you to the group with the name groupName, so that you have access to protections with a [groupName] tag on it.
- blocklocker.wilderness - place chests outside Towny towns. Granted by default, so use your permissions plugin to negate this permissions if you don't want people to place chests in the wilderness. Has no effect if Towny is not installed.
Commands
- /blocklocker <line number> <text> - places the specified text on the last sign you selected (right-clicked). You can only select signs on your own protections, unless you have the permission node blocklocker.edit.
- /blocklocker reload - reloads configuration files. Requires the permission node blocklocker.reload
Configuration
You can change what block types can be protected, you can set a default close timer for doors and you can set whether one sign protects a whole row of containers, or only the current container.
The file
plugins/BlockLocker/config.yml contains explanations of all settings, I won't repeat them here. Just open the file!
When you have made a change, run the command
/bl reload for your settings to take effect. You can of course also restart the server.
Translations
By default, the plugin displays all messages in English. To change them to another language, open the
plugins/BlockLocker/config.yml file and change the setting
languageFile to one of the other options listed there. You can also set it to any other language, but then you need to translate everything yourself. It would be appreciated if you share those translations with me, so that I can include them in the plugin.
In the same folder as the configuration file, you can find the translation file. You can edit this file to customize the translations. You can even edit the tags like [Private], [More Users], etc. Multiple values are allowed, here for example
private: ['[Private]', '[Privé]'] makes both [Private] and [Privé] work for protecting signs.
Group support
When placing [MyGroup] on a sign, every member of MyGroup will have access to the protection. The plugin considers the following persons to be a member of the group MyGroup:
- People with the permission node blocklocker.group.mygroup. The permission node is always blocklocker.group. with the lowercase group name appended to it.
- People in the scoreboard team MyGroup (case insensitive). You can modify scoreboard teams using the (vanilla) command /scoreboard.
- When MassiveCraft Factions is installed: people in the faction called MyGroup (case insensitive).
- When Towny is installed: people in a town or nation called MyGroup (case insensitive).
- When mcMMO is installed: people in a party called MyGroup (case insensitive)
- When Guilds is installed: people in a guild called MyGroup.
- When SimpleClans is installed: people in a clan called MyGroup.
When placing +MyGroup+ on the sign, only the leaders of MyGroup will have access. Those are:
- When Towny is installed: mayors and assitants of Towny towns and nations called MyGroup will have access.
- When mcMMO is installed: the party leader.
- When Guilds is installed: the guild master.
- When SimpleClans is installed: the clan leader.
Other group systems are currently not supported. If you want support for another plugin, just ask me.
Automatic updater
As this is an anti-stealing plugin, bugs can have a large impact on the economy of your server. For that reason, the plugin notifies you of any updates. As of version 1.7, the plugin will not download any files anymore, making the
AUTO_INSTALL setting equal to
JUST_NOTIFY. The updater works asynchronously: it will never pause your server while it's checking for something.
If you want to disable the updater you must edit the
plugins/BlockLocker/config.yml file. Set the
updater setting in the file to
DISABLED or
JUST_NOTIFY. If you don't see the
update setting in the file it is because you have a pre-1.0 config file. Simply add
updater: DISABLED or
updater: JUST_NOTIFY to a new line and you'll be fine.
UUID support
BlockLocker has been built with UUID support in mind. If you put a name on a sign, then the plugin will automatically look up the UUID of the player, and store that on the sign in a way that's invisible for players. For the technical people: it uses Bukkit's PersistentDataHolder API.
When your server is running in offline mode and
not behind a BungeeCord proxy, the plugin won't use UUIDs and will simply only use names.
The plugin does not contact mojang.com to look up the UUIDs. It will only store the UUIDs of players that are currently online. If you write the name of an offline player on the sign, then no UUID will be stored until that player comes online, and someone interacts with the protection.