Skip to content

Configuration

RedstoneFuture edited this page Jul 19, 2021 · 27 revisions

Here you can find the configuration for the many different files in the LWC folder. Be sure not to touch what you're not sure about, and make sure you use spaces, not tabs.

Custom Locales

LWC supports a wide selection of default locales (languages), which you can view here.

If the locales provided are not sufficient enough for the needs of your server, it is quite easy to create your own. Just make a file called lwc_LOCALE.properties in the plugins/LWC/locale folder, where LOCALE would be the name of your locale.

Open this file in your favourite text editor. It will be empty. You may want to copy the contents of one of the default locales, so that you do not have to start from scratch. Then, you can modify any message(s), and save the file.

Finally, make sure you change the core.locale setting in the core.yml file to match your LOCALE. Yes, it's that easy!

Note: Please consider making a pull request and merging your changes if you are either improving an existing locale, or adding a new one for a language that is not currently supported by default.

core.yml

core

locale: en The language LWC will use, specified by its ISO 639-1 code.

flushInterval: 10 How often updates are batched to the database (in seconds). If set to a higher value than 10, you may have some unexpected results, especially if your server is prone to crashing.

cacheSize: 10000 LWC regularly caches protections locally to prevent the database from being queried as often. The default is 10000 and for most servers is OK. LWC will also fill up to when the server is started automatically.

precache: -1 How many protections are precached on startup. If set to -1, it will use the cacheSize value instead and precache as much as possible

showNotices: true If true, players will be sent a notice in their chat box when they open a protection they have access to, but not their own unless is set to true

showMyNotices: false If true, players will be sent a notice in their chat box when they open a protection they own.

opIsLWCAdmin: true If true, ops will be considered LWC admins (e.g with a Permissions plugin, considered to have lwc.admin) and thus will have very destructive LWC commands.

disableHistory: false If true, LWC will not log history about protections. If you are using LWC-Economy and this is disabled, you will NOT receive refunds for purchased protections

groupPrefix: 'group' The permission node prefix that is used to match player groups when no supported permission plugin is found, e.g group.vip matches the player's group as vip

updateNotifier: true If you will be notified of LWC updates

optional

onlyProtectWhenOwnerIsOnline: false Protections are only active when a player is online. So if a player is offline, anyone can access it. If the player is online, it functions normally.

onlyProtectWhenOwnerIsOffline: false Protections are only active when a player is offline

exemptBlocks: [] Block IDs to automatically blocks from /lwc admin purge, /lwc admin expire, etc.

optOut: false Unused. You can now disable Metrics from the PluginMetrics/config.yml file.

blacklistedBlocks:
- hopper

Blocks that cannot be placed around someone else's protection. This is most useful

blacklistedPlayers:
- player

Players that are blocked from destroying any blocks protected by LWC. Mainly useful for MCPC where mods can remove blocks and try to break the block by sending an event first (e.g turtle)

useProtectionLimits: true If protections limits will be enabled (defaults to unlimited protections)

database

adapter: sqlite The database adapter to use, for example sqlite (default) or mysql

path: 'plugins/LWC/lwc.db' This is strictly for SQLite only and should be left alone. When changing to MySQL and this is left intact, LWC will automatically convert your protections from SQLite to MySQL

host: 'localhost' The MySQL host. You can specify a non-default port (3306) by adding :port, e.g host: 'localhost:3307'

database: 'lwc' The database LWC should use to store data (not necessary for SQLite)

username: '' The username LWC should use to connect to the server with (not necessary for SQLite)

password: '' The password LWC should use to connect to the server with (not necessary for SQLite)

prefix: 'lwc_' The prefix for LWC tables. For example, a prefix of 'lwc_' will make the protections table show up as lwc_protections

ping_interval: 300 The interval between pinging the MySQL server to keep it alive (in seconds)

protections

denyRedstone: false Whether or not to prevent redstone from opening doors and stuff. The player can change this behavior with the "Redstone" protection flag if they have the permission.

denyHoppers: false Whether hoppers will be blocked by default. The player can change this behavior with the "Hopper", "Hopperin" and "Hopperout" protection flag if they have the permission.

autoRegister: off Whether or not to lock a block as soon as it's placed.

ignoreBlockDestruction: false Whether block breaks will be processed. Do not enable this unless you know what you're doing.

ignoreLeftClick: false Whether or not to ignore left clicks on a protected block.

ignoreRightClick: false Whether or not to ignore right clicks on a protected block.

ignoreExplosions: false Whether or not to allow explosions to destroy protected blocks.

allowEntityBreakDoor: false Whether or not zombies can break down your doors.

allowEntityInteract: false If entities - such as villagers - should be allowed to interact with protections.

quiet: false Creation messages and protection notices will not be shown for this protection

readonly-modify: false If true, users will be prevented from modifying a protection they own. Only LWC admins will be able to modify the protections.

readonly-remove: false If true, users will be prevented from removing a protection they own. Only LWC admins will be able to modify the protections.

blocks

In this config part you define the blocks that you want to be able to protect, so blocks there aren't register in this config part can't also protect.

Any block listed in the Spigot Material API can be added here. Entries must match exactly the name on that page, in lowercase. (Keep in mind that the page lists all materials in Minecraft, and not just blocks.)

Example: If a user place a chest and have the permission for autoprotect, it will instantly protect as "private".

Tip: The autoprotection behavior can be override with the "Nolock" player mode.

    blocks:
        chest:
            enabled: true
            autoRegister: private

Options

enabled: <"true" or "false"> = Whether or not to enable the protection.

autoRegister: <protection type> = Whether to automatically lock the block as it's placed. Without this option it's only possible to protect the block by command.

Wildcards

Blocks can also defined with wildcards: a * repretent all signs from a to z with flexible size.

Example: Allow to protect all shulker boxes

        shulker_box:
            enabled: true
            autoRegister: private
        '*_shulker_box':
            enabled: true
            autoRegister: private
        light_blue_shulker_box:
            enabled: true
            autoRegister: private
        light_gray_shulker_box:
            enabled: true
            autoRegister: private

modes

    droptransfer:
        enabled: true
        crossWorld: false

Whether or not drop transfer mode is enabled. (Dropped items go to a chest)

    persist:
        enabled: true

Whether or not persist mode is enabled. (Commands will be automatically repeated)

doors.yml

doors

enabled: true Enable the opening of Iron Doors when you click on them

doubleDoors: true If true, double doors will open, presuming they are both protected and you can access both

action: toggle Actions: toggle: the door will just open if it's closed, or close if it's opened. Will not auto close, openAndClose: the door will automatically close after . If it was already opened, it will NOT re-open.

interval: 3 The amount of seconds after opening a door for it to close. No effect if openAndClose name is not being used.

economy.yml

TODO

limitsv2.yml

Use this if you want to set up limits for how many protections players are allowed to have. Configurable per block, with a default, for everyone, groups, or players.

Example configuration:

# default to unlimited protections
defaults:
    default: unlimited
    chest: 5
    furnace: 1

# Overrides for Permissions groups
groups:
    # 5 chests, unlimited everything else
    SampleGroup:
        default: unlimited
        chest: 5

    # 5 total protections
    SampleGroup2:
        default: 5

players:
    # Gives Notch unlimited protections
    Notch:
        default: unlimited

magnet.yml

magnet

enabled: true Whether or not the magnet should be enabled (Nearby items go to a chest)

radius: 2 The radius around containers that they will suck up

perSweep: 10 How many items to check per sweep (per world). It is HIGHLY UNRECOMMENDED to use a very high value.

    blacklist:
        - dirt
        - stone

A blacklist of items that will NOT be picked up. Item names usually work, but be careful.

worldguard.yml

worldguard

allowRegionPermissions: true If true, allow protections to use region-level permissions (i.e., reuse WG region member lists as the block-level ACL)

allowProtectionsOutsideRegions: true If true, protections will be allowed in non-regioned areas

requireBuildRights: true If the player needs to have build rights in a region to be able to protect blocks using LWC

    regions:
        - '*'

Regions that LWC protections SHOULD be allowed in

    blacklistedRegions:
        - 'Region1'

Regions that LWC protections should NOT be allowed in

towny.yml

towny

townBorders: false If true, LWC will only allow protections to be created inside of Towns via the Towny plugin

cleanup.plotClear: false Should LWC remove protections when a plot is cleared?

cleanup.townUnclaim: false Should LWC remove protections when the town is unclaimed?

cleanup.townRuin: false Should LWC remove protections when a town goes to Ruin?

Clone this wiki locally