Brianetta / StickyLocks

New locking plugin for Bukkit. Database/UUID/tool/command driven (default tool is a stick).
GNU General Public License v3.0
4 stars 3 forks source link

StickyLocks logo

StickyLocks

Locking plugin for Bukkit/Spigot. Database/UUID/tool/command driven (default tool is a stick).

Features

Using a stick as a wand, a player selects a protectable block with right-click. The player can claim or un-claim the selected block with a subsequent left-click. While claimed by a player, only that player can interact with that block.

While selected, the player can add names or groups of names to the list of players permitted to interact with the block. Groups can be renamed, and their membership adjusted, at any time by the player - dynamically updating all the protected blocks that have that group.

The list of protectable blocks is configurable, but by default includes doors, chests, switches, buttons and pressure plates. It also includes redstone repeaters and comparators, protecting redstone device timings.

This plugin does not prevent destruction of any of the protected blocks. The idea is that this plugin will be used in combination with some other plugin to provide protection from destruction, such as Towny, Factions or WorldGuard regions.

Building StickyLocks

StickyLocks is a Maven project. It was developed using IntelliJ Idea, but should work fine in Eclipse, and shell junkies won't have any trouble.

Installation:

After you've built StickyLocks, put the resulting .jar file into your plugins folder and start your Bukkit server (or load it with any plugin manager). It will write out the default config.yml file (as seen here).

Edit the config if necessary, although everything should work straight away. The plugin will create and use StickyLocks.db, which is an SQLite database that can be queried with any SQLite3 compatible client.

The plugin tries to detect whether other plugins are protecting against block-breaking. If they are, it won't allow a player to add a lock where they cannot break. This is to prevent grief-by-locking.

Permissions

Commands

First, the user has to use a tool wand. By default, this is a stick. Right-clicking on a protectable block with the stick will tell the player what that block is, who its owner is, or that it is unowned. The plugin uses green text to indicate that the player has access, or a command succeeded. It uses red to indicate that the player has no access, or that a command failed. Right-clicking on a block with the stick will also select that block.

Once selected, left clicking on the block toggles its lock state. If it's unowned, it will become owned by the player. If it is owned by the player, or the player is a locksmith (see permisisons, above) it will become unowned, and all lock information will be removed. Once selected, commands will operate on that block, or on the user associated with that block.

Right-clicking the air with a stick deselects the selected block.

/stickylocks is aliased as /sl

Configuration

Fairly simple, and the defaults are likely to be suitable.

protectables is a list of items that can be protected by this plugin. If future versions of Minecraft add new items which should be protected, they can be added by name. Deprecated ID numbers are not supported.

tool is the name of the material type the player must hold to select or lock a block.

chatprefix is a short text added to the start of chat lines in square brackets. So, the default setting of SL would look like [SL] Some output here.

Incompatibilities

If your server is running a no-cheat plugin, you may need to disable checking for instant breaking in order to use StickyLocks. StickyLocks' heuristic for detecting block protection involves faking and then cancelling a block break event, and your no-cheat plugin may well interpret this as cheating behaviour.

In the case of NoCheatPlus, you would need to disable Fastbreak detection.

License

StickyLocks is GPL. This documentation is FDL.