IchorPowered / Latch

A locking plugin to protect your containers.

Latch

Latch is a locking plugin allowing players to protect blocks like chests/furnaces/doors from being accessed by other players.

Release / Source Code

Currently built against Sponge API 7.0.0.

You can download the latest release here on Ore.

As well as view the source code on Github.

Please report any issues you find or features you desire here or on our issue tracker.

Features

  • 5 different types of locks
    • Public locks - anyone can access, just applies protection
    • Private locks - only players the owner adds can access
    • Password always locks - players with the password can access (required to type every time)
    • Password once locks - players with the password can access (only need to type the first time)
    • Donation locks - (applies to containers) only players the owner adds can withdraw, anyone can deposit
  • Lock protection from players, pistons, (optionally) explosions, (optionally) redstone
  • Configurable lock limits per type or total per player
  • Configurable lockable blocks
  • Configurable redstone and explosion protection
  • Locks saved to h2 database latch.mv.db

Configuration latch.conf, stored in the /config/latch subdirectory

  • add_default_permissions - adds the “latch.normal” default permission as true
  • lockable_blocks - blocks that can be locked by players using this plugin
  • protect_from_explosives - should locks be protected from explosions
  • prevent_adjacent_to_locks - blocks to prevent being placed next to locks the player doesn’t own
    • Hopper here by default until Sponge adds necessary events to protect the locks
  • protect_below_block - locks that should also protect the block below them
    • Doors here by default until there’s some way to protect them when the block below is broken
  • lock_limit - limit for “total” locks per player, or per type of lock
    • public, private, password_always, password_once, donation
  • protect_from_redstone - allow locks to be protected from redstone
  • auto_lock_on_placement - whether or not blocks which can be are automatically locked on placement
  • remove_bypass_on_logout - whether or not admin bypass is removed on logout
  • clean_old_locks - whether or not old locks should be automatically deleted
  • clean_old_locks_older_than - how old locks need to be to be automatically deleted
  • clean_old_locks_interval - how often Latch should delete these old locks

Commands Latch uses Sponge’s short and long command flags for some commands. -p can be added to most commands to persist the command after use.

  • /latch or /lock - base for most of the commands, displays plugin information
  • /latch help - list help for the commands
  • /latch private - create a private lock on the next block placed/clicked
  • /latch password [password] - creates a password lock with the given password (add below flag for different type)
    • -a - require a password every time to access (default)
    • -o - require a password once to access
  • /latch change - change the attributes of one of the locks you’re the owner of (add below flags, multiple flags can be used)
    • --type=[PRIVATE, PASSWORD_ALWAYS, PASSWORD_ONCE, DONATION] - changes the lock type
    • --password=[password] - change the password of the lock (resets the access list)
    • --add=[player] - add the player to the lock access list (can have multiple within a single command)
    • --remove=[player] - remove the player from the lock access list (can have multiple within a single command)
    • --owner=[player] - gives the lock to another player
    • --redstone=[true/false] - prevent redstone interactions from occurring on this lock
  • /latch delete - remove a lock you’re the owner of
  • /latch persist - duplicates the functionality of the -p flag (persisting the last command typed)
    • Use again to turn off the command, or use /latch clear
  • /latch info or /latch display - display the lock name, owner, object and players that can access
  • /latch list - display all of your locks
  • /latch list [player] - to display all of a player’s locks (requires latch.admin.list permission)
  • /latch limits - to see how close you are to your limit of each lock type
  • /latch limits [player] - to see how close another player is to their limits (requires latch.admin.limits permission)
  • /latch open [password] or /unlock [password] - to attempt to open a lock with the password
  • /latch add [player] or /latch remove [user] - modify the users allowed to access the lock
  • /latch purge - deletes all of your locks
  • /latch purge [player] - deletes all of the locks of the specified player (requires latch.admin.purge permission)
  • /latch bypass - enter bypass mode as an admin to access other’s locks
  • /latch clean [days] - deletes all locks older than the specified amount of days

Permissions Each command has its own permission node under latch.normal (i.e. latch.normal.info for the /latch info command). Other permission categories below:

  • latch.normal - base for non-admin permissions/access
  • latch.normal.create - base for lock creation permissions
    • latch.normal.create.password.always - allows creation of a password_always lock
    • latch.normal.create.password.once - allows creation of a password_once lock
    • latch.normal.create.private - allows creation of a private lock
    • latch.normal.create.public - allows creation of a public lock
    • latch.normal.create.donation - allows creation of a donation lock
    • latch.normal.purge - allows deletion of all of your locks
    • latch.normal.limits - allows a player to see how close they are to reaching the server limits
  • latch.admin - base for admin permissions/access
    • latch.admin.list - allows use of /latch list [player] to display a player’s locks
    • latch.admin.purge - allow use of /latch purge [player] to delete all of a player’s locks
    • latch.admin.bypass - allows entering a bypass mode where you can access any lock
    • latch.admin.limits - allows use of /latch limits [player] to view how close a player is to the server limits
    • latch.admin.clean - allows an admin to delete all locks older than a specified amount of days

Category: Protection

Published on Dec 31, 2016

2074 views

551 total downloads

Licensed under MIT

Pages

Members