StickyLocks

StickyLocks for Bukkit

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. When claimed by a player, only that player can interact with that block. All player information is stored by UUID, so you must use a server implementing Bukkit 1.7 or higher.

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 things like doors, chests, hoppers, 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. Having said that, enough people demanded it that there is now a companion plugin named StickyProtection which will prevent the destruction of locked blocks (and key adjacent blocks) by player or by piston.

Installation

Place the .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.

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 will heuristically detect when other plugins are providing protection against players building, and will not allow players to lock things they couldn't have built.

Permissions

  • stickylocks.lock permits a user to claim a block (door, chest, etc) and choose who can use it through an access list
  • stickylocks.locksmith permits a user to modify or unlock other users' claimed blocks
  • stickylocks.ghost permits a user to open or use blocks that would otherwise be locked by the plugin
  • stickylocks.reload permits the player to reload the plugin's config from disk

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

  • /sl show lists the lock information for the current block. It shows who owns it, and lists the names of players and groups of players with access to that block. Any groups listed will be as defined by that block's owner.
  • /sl add <player|group> adds the specified player or group of players to the list of people allowed to use the block. The group will be one owned by the block's owner, if the player is a locksmith. In the event that a group and a player both have the same name, the group will be used.
  • /sl remove <player|group> removes the specified player and/or group of players from the list of people allowed to use that block.
  • /sl group <group> lists the members of the specified group. If a block is selected, the group will be that belonging to the block's owner.
  • /sl group <group> add <player> ... adds the specified player(s) to the specified group. If a block is selected, the group will be that belonging to the block's owner (and subject to permission).
  • /sl group <group> remove <player> ... removes the specified player(s) from the specified group. If a block is selected, the group will be that belonging to the block's owner (and subject to permission).
  • /sl group <group> {rename|merge} <name> renames the group (rename and merge are identical sub-commands). If the target group exists, the group's members will be added to it. If a block is selected, the group will be that belonging to the block's owner (and subject to permission).
  • /sl clearselection deselects the player's currently selected block, the same as right-clicking air.
  • /sl reload reloads the plugin's configuration from the disk, allowing configuration to be changed without restarting the plugin.

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.

tools 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.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files

Bukkit