LWC Plug-in commands

RaveLuth

New Member
May 30, 2015
93
0
0
45
#1
Introduction

LWC is a protection plugin for singular blocks such as chests, furnaces, doors. This allows for block by block protections.

Most players will only need to know the basic functions of LWC. That is, protecting blocks and managing said protections.

Expiration

LWC protections expire after 20 days of being inactive (not logging on to the server). They do not expire due to not being used.

Protection Types

There are 4 protection types in LWC, information on these types and how to create them is given below:

Public

Anyone can access the protection, but no one can break it or protect it for themselves. Useful for community chests that store items for anyone to use and for block protection where no control of use is wanted, such as an iron block used as an mcMMO anvil.

Usage: /cpublic

Private

By default, only you can access the protected block. You can also add other players and groups to the access control list (ACL) so that they can access the block as well. This protection is useful for limiting who can access doors, chests, or other items with an inventory.

Usage: /cprivate [Additional Players/Groups]

Password

This protection has a set password for each block and you need to enter it each time you login. This can of course be shared with other players โ€” they will be able to access the protection until they log out (after that they will need to re-enter it)

Usage: /cpassword <password>

Donation

This protection acts like a Private protection, except that anyone can put items into the chest. This protection is useful for mail chests, donation collections or other places you might have used a hopper and chest previously.

Usage: /cdonation [Additional Players/Groups]

Blocks

LWC Protectable Blocks

The following blocks can be protected:

Chest
Trapped Chest
Enderchest
Furnace
Enchantment Table
Dispenser
Sign

Iron Door
Wooden Door
Trapdoor
Fence Gate
Anvil
Brewing Stand
Bed

Hopper
Dropper
Iron Block
Gold Block
Emerald Block
Lapis Block
Diamond Block

Examples

Protect an enchantment table, with a public protection

/cpublic
Left click the enchantment table.

This allows anyone to use it, but only the owner can break it.

Protect a single iron door, private with herp and derp also able to access it

/cprivate herp derp
Left click the iron door.

Private iron doors can be opened by right-clicking just like wooden doors. This means you no longer need a button, lever or pressure plate.

Protect an anvil, using a password protection, with the password being, Smith

/cpassword Smith
Left click the anvil.

Anvils will still break after their final use, and fall if the block below them is destroyed, leaving the protection in its original position.

Create a donation chest, and give derp access to the contents

/cdonation derp
Left click the chest.

Remove a protection on a chest

/cremove
Left click the chest.

Commands

/cprivate โ€“ Create a private protection.
/cpublic โ€“ Create a public protection.
/cdonation โ€“ Create a donation chest.
/cpassword <password> โ€“ Create a password protected block.
/cmodify โ€“ Modify an existing private protection.
/cunlock <password> โ€“ Unlock a password-protected block.
/cinfo โ€“ View information on a protection.
/climits โ€“ View your current protection limits.
/cremove โ€“ Remove a protection.
/cremoveall โ€“ Removes all protections owned by the player.
/cpersist โ€“ Allow the use of the previous LWC command multiple times, use /cpersist again to disable.
/cautoclose <on|off> โ€“ Enable or disable use of autoclose after 3 sec on doors. (Default is off)
/credstone <on|off> โ€“ Enable or disable use of redstone on a protection. (Default is off)
/chopper <on|off> โ€“ Enable or disable use of hoppers on a protection. (Default is off)
/cnospam โ€“ Toggles the ability to hide protection creation messages, which includes automatic display of chest ownership.
/LWC fix โ€“ Used to fix protected doors when they are out of alignment, one open, one closed, for instance.

Advanced Examples

Repetitive Tasks โ€“ /cpersist

Any LWC command can be used multiple times using /cpersist directly after the command.

Protect a large number of chests, private, with herp and derp also having access

/cprivate herp derp
/cpersist
Left click each of the chests.
/cpersist
Left click the last chest or click one that is already protected.

Protect a number of doors, private with herp and derp also able to access them, set them to autoclose, and check the permissions.

/cprivate herp derp
/cpersist
Left click each of the doors.
/cautoclose
Left click each of the doors.
/cinfo
Left click each of the doors.
/cpersist
Left click the last door or click one of them again.

Modifying Permissions โ€“ /cmodify

Changing Protection Types

The /cmodify command can be used to change the type of a protection, like changing a chest from Password to Private.

/cmodify private
Left click the chest

This usage does not allow giving access to other people at the same time.

Modifying the Access Control List

A private protections, as well as a donation chest, can have an Access Control List (ACL), which specifies who can access the protection. The owner is considered just that โ€“ the owner โ€“ and can only be removed from the protection by using /cremove on it.

Adding and Removing Players

Additional players can be added and removed from an ACL. To add herp, derp, and traitor to an ACL, and then remove traitor:

/cmodify herp derp traitor
Left click the block with the private protection
/cmodify -traitor
Left click the block with the private protection

Removing an entry from an ACL is always done by preceding the entry with a minus โ€˜-โ€˜ sign.

Admin Permission

An entry in the ACL can be given admin permission for a protection if the entry is made with an ampersand โ€˜@โ€™ before the name. A player with admin permissions for a block can modify the ACL, adding and removing players from the access control list. To add the officers of a faction to the ACL as admins of chestsand doors used by the members of the faction so that they can add new recruits, assuming the protections are already private and you are the owner:

/cmodify @Herp @derp
/cpersist
Left click the chests and doors you want to have these permissions
/cpersist
Left click the last one, or click one of them again.

Group Permissions

Groups can also be given permissions in the ACL. This particular feature is probably more useful for staff than the normal player. LWC recognizes two different types of groups, the permission groups used by the server, such as premium and the staff ranks, and the WorldGuard groups that have access to a particular region. The protected items do not need to be in the region added to the ACL. To give the renter of house s105 a locked door and chest and give them control of the access list:

/cprivate @r:s105:Regalia
Left click the door of house s105
/cprivate @r:s105:Regalia
Left click the chest in house s105

Item Permissions

Permission can also be granted based on what a player is holding in their hand. This feature is very limited. It uses the Material IDs and gives an error if you try to use data values, so you can specify wood planks using the id 5, but oak, spruce, jungle and birch wood planks would all work. If you would try to specify 5:1, it would give you an error when you try to open/use the item and you would have to change the permissions to fix the problem. To have an anvil that you can only access if you have a an iron ingot in your hand:

/cprivate item:265
Left click the anvil

LWC Flags

Current Bug: Flags can be set, but can not be disabled without breaking and remaking the permission.

Autoclose โ€“ /cautoclose on

When a door has this flag set โ€œonโ€, the door will automatically close after 3 sec. This can also be used for fence gates and trapdoors.

/cautoclose on
Left-click the door.

Redstone โ€“ /credstone on

When a protection has this flag set โ€œon,โ€ redstone signals are allowed to interact with the protected block.

/credstone on
Left-click the door.

Hopper โ€“ /chopper on

When a block with an inventory has this flag โ€œon,โ€ a hopper can interact with the inventory. Note that protected hoppers with the same owner as the inventory block can already interact with the inventory, eliminating the need to set the flag for this case.

/chopper on
Left-click the chest.

Drop transfer

Permission: lwc.mode.droptransfer

Drop transfer allows you to do just that: drop transfer items to your chest. It does not work across world boundaries and will only transfer to a chest in the current world. There is currently no limit to the range.

When you drop an item (or stack) from your inventory to the ground, it will be transferred to the chest. If the chest is full, you will be notified and the items that did not fit will be returned to you.

To enable it first you need to select a chest using /cdroptransfer select to mark it as your target.

Once you select it, drop transferring is ON until you either disable it with /cdroptransfer off or log out.

Logging out will clear your drop transfer target. Using /cdroptransfer off will temporarily disable it -- you can re-enable it with /cdroptransfer on without reselecting your chest.

Finally, you can view the current status of drop transfer with /cdroptransfer status
Selected a chest and enabled


Refrences:

http://dev.bukkit.org/bukkit-plugins/lwc/
https://github.com/Hidendra/LWC/wiki
https://www.spigotmc.org/resources/lwc.2150/