Skip to content
ShadowMC

Configuration

ShadowRegions

Protect a place in three steps, with the rules written in plain words.

Free v1.0.4

Where the files are

plugins/ShadowRegions/

The plugin creates them on first start and updates them by itself on new versions, keeping your changes.

Applying changes

/rg reload

Reloads the files without restarting the server.

What’s inside

21 files · 193 settings

Start with: config.yml

Settings

The files that decide how the plugin behaves. Start here.

config.yml

General settings
97 settings
plugins/ShadowRegions/config.yml
File notes

Everything you need is here. The other files are:

lang/<locale>.yml    translations
menus/<name>.yml     GUI layouts
presets/<name>.yml   flag presets
data/regions/*.yml   the regions (YAML mode)

On update your files are moved to the new version automatically: what you changed is kept, the old copies are in backup/<date>/, and if something needs your attention you will find PORTING-<version>.txt in this folder.

config-version1
general2 keys
server-id"server-1"

Identifies this server, used when several servers share one database.

update-checktrue

Messages

Adding a language = dropping a file into lang/. It is picked up on its own. Player facing text lives there, not here.

messages2 keys
default-locale"en_US"

The language used when a player's own is not in lang/, and by the console. Ships with en_US and it_IT. Set "it_IT" here for an Italian server.

follow-client-localetrue

Storage

AUTO  -> YAML files inside this folder (the default). No setup at all.
         Fill in the MySQL host below and AUTO switches to the database.
YAML  -> always files, even when credentials are present
MYSQL -> always the database
Keep reading

Regions live in memory either way: the backend only ever receives the writes, so performance is identical between the two. To move from one to the other: /rg storage migrate

storage7 keys
typeAUTO
flush-interval"20s"

How often changed regions are written to disk. They are also written immediately by /rg save and at shutdown.

table-prefix"sr_"

Table prefix, used by the database backend only.

fail-safetrue
true  -> if storage dies we stay up, read only
false -> if storage dies the plugin disables itself
storage.backup3 keys
enabledtrue
on-startuptrue
keep10
storage.mysql6 keys
host""

Empty host = we stay on the local files.

port3306
database"shadowregions"
username""
password""
storage.mysql.properties3 keys
useSSLfalse
characterEncoding"utf8mb4"
serverTimezone"UTC"
storage.pool5 keys
maximum-size6
minimum-idle2
connection-timeout"10s"
idle-timeout"10m"
max-lifetime"30m"

Protection

How the engine behaves when somebody tries to do something.

protection9 keys
enabled-worlds[ ]

Empty = every world. disabled-worlds wins over enabled-worlds.

disabled-worlds[ ]
deny-build-for-non-memberstrue
true  = a freshly created region protects straight away (WorldGuard behaviour)
false = a region with no flags stops nobody
auto-bypasstrue

Whoever holds the bypass permission has it already on, without turning it on.

op-bypasstrue
bypass-ignores-effectsfalse

false = greeting, game mode and effects also apply to somebody in bypass

event-priorityNORMAL

LOWEST | LOW | NORMAL | HIGH | HIGHEST

fail-closedfalse

If a listener throws: false lets the action through, true blocks it.

deny-message-cooldown"2s"

Anti spam for the refusal messages, per player.

Selection

selection5 keys
wandWOODEN_AXE
match-by-materialfalse
true = any item of that material works as a wand
false = only the wand handed out by /rg wand (carries an internal tag)
max-volume5000000

0 = no limit

max-polygon-points150

Every extra vertex is one more step of deciding whether a block is inside, and that runs inside events. 150 is already a shape nobody draws by hand; past 512 the plugin will not go anyway.

persistfalse

true = the selection survives a restart

Limits

Raised per group with permissions:

shadowregions.limits.regions.<n>
shadowregions.limits.volume.<n>

and lifted entirely with shadowregions.limits.bypass

limits5 keys
max-regions-per-player0
max-volume-per-player0
min-size1
max-children0
limits.claim5 keys
enabledtrue
worlds[ ]
min-size5
max-size500
overlap-allowedfalse

Particle outline

preview9 keys
enabledtrue
radius64

Nothing is drawn past this distance from the player.

max-points600

Most points drawn in one pass.

interval10

Ticks between one drawing and the next.

color-edge"#FFFFFF"
color-normal"#55FF55"
color-expand"#55FF55"
color-contract"#FF5555"
color-shift"#55FFFF"
editor6 keys

Area editor (the menu with a button per side) docs/11-EDITOR-AREA.md

default-step1
steps[1, 2, 5, 10, 25, 50, 100]
shift-multiplier5
undo-depth32
auto-previewtrue
confirm-on-closetrue

Performance. There is almost never a reason to touch these

docs/15-PERFORMANCE.md

index1 key
max-chunks4096

Past this width in chunks a region goes into the "large" list instead of filling thousands of buckets.

query-cache2 keys
enabledtrue
ttl500

milliseconds

Flags that act over time: healing, food, effects, game mode, flight

effects2 keys
tick-interval20

ticks between one pass and the next

restore-on-exittrue

put game mode, flight and speed back when leaving the region

The chunk-unload flag

A region with chunk-unload deny keeps the chunks of its box loaded (Paper plugin chunk tickets: nothing is written into the world, and they go away when the plugin stops). A region wider than this, in chunks, is skipped with a warning in the console.

chunk-unload1 key
max-chunks-per-region256

Change history (/rg history, /rg undo)

history3 keys
enabledtrue
keep-per-region50
keep-days30

Conditional rules

Flags that switch themselves on when something happens:

/rg condition arena add pvp deny when weather thunder

They are evaluated on a timer, never inside an event, so a region with rules costs the same as one without at query time. docs/25-CONDIZIONI.md

conditions2 keys
enabledtrue
interval20

ticks between one evaluation and the next

Selling, renting and expiry

The money is moved by the economy plugin: without one, all of this is inert. docs/26-VENDITA-E-AFFITTO.md

lease4 keys
enabledtrue
on-expiryUNCLAIM
DELETE  -> on expiry the region is deleted
UNCLAIM -> on expiry it stays, but with no owners
warn-before[1d, 1h]

how far ahead to warn the owner

check-interval"30s"

how often to check expiries and renewals

Per region statistics (/rg stats)

Entries, time spent inside, blocks placed and broken.

stats2 keys
enabledtrue
track-visitorstrue

keeps the list of unique visitors. Turn it off if you do not need it.

Block log and /rg rollback

This is NOT a replacement for CoreProtect and does not try to be: it records only the changes INSIDE regions, with a ceiling on rows, and it is off by default. It is for putting spawn back together at 2am without installing anything else. docs/27-ROLLBACK.md

rollback3 keys
enabledfalse
max-entries200000
keep-days7

Web map

With Dynmap installed, regions show up as coloured areas. Without Dynmap this section does nothing.

map1 key
map.dynmap7 keys
enabledtrue
label"Region"
fill-colour"#7B2FF7"
fill-opacity0.25
line-colour"#F107A3"
line-opacity0.8
line-weight2

Import from other plugins

import2 keys
on-conflictSKIP

SKIP | OVERWRITE | RENAME

backup-beforetrue
security1 key

Security docs/29-SICUREZZA.md

region-console-commandstrue

The enter-command / exit-command flags can run commands as the console. Setting them already needs a permission of its own (shadowregions.flag.enter-command), but if you do not want a region to be able to reach the console under any circumstance, set this to false.

bStats - anonymous usage statistics (https://bstats.org)

metrics1 key
enabledtrue

What is sent, every 30 minutes: that this server runs ShadowRegions, the plugin, Minecraft/Paper and Java versions, the operating system, the number of CPU cores, how many players are online (a number, nothing else), a random serverUuid that identifies nothing, and whether storage is YAML or MySQL. No player data leaves the server: no names, no UUIDs, no addresses, no regions or coordinates.

Keep reading

false switches it off for this plugin only. enabled: false in plugins/bStats/config.yml switches it off for every plugin on this server at once.

Diagnostics

debug3 keys
enabledfalse
watchdogfalse

logs a warning when a listener runs over its time budget

log-deniedfalse

writes every blocked action to the console. Very noisy.

blacklist.yml

What cannot be protected
3 settings
plugins/ShadowRegions/blacklist.yml
File notes

Rules that apply EVERYWHERE, inside regions and outside them. They are for the things that must not happen on the server, full stop. A region watches an area; the blacklist watches an item.

While "enabled" is false this file costs nothing: the listeners leave on their first line.

enabledfalse

How a rule is written

- items:   a list of materials, or [ "*" ] for every one of them
    on:      break | place | use | interact | drop | pickup
             (when missing, the rule applies to all of them)
    actions: deny    stop the action
             tell    tell whoever did it
             notify  tell whoever holds shadowregions.notify
             log     write it to the console
             kick    kick from the server
    message: MiniMessage text to use instead of the default one
Keep reading

Whoever holds shadowregions.blacklist.bypass is never stopped.

The keys above are the syntax and stay English. The "message" is what a player reads, so write it in whatever language your server speaks.

default[ ]

These apply in every world.

Ready made examples, uncomment to use:

default:
  - items: [ TNT, TNT_MINECART ]
    on: [ place, use ]
    actions: [ deny, notify, log ]
    message: "<red>La TNT e disattivata su questo server."
- items: [ LAVA_BUCKET ]
  on: [ place ]
  actions: [ deny, tell ]
- items: [ BEDROCK, BARRIER, COMMAND_BLOCK, STRUCTURE_BLOCK ]
  on: [ place, break ]
  actions: [ deny, notify, log ]
- items: [ SPAWNER ]
  on: [ break ]
  actions: [ notify, log ]
worlds{ }

Extra rules for one world only. They add to the default ones.

worlds:
  world_nether:
    - items: [ WHITE_BED, RED_BED ]
      on: [ interact ]
      actions: [ deny, tell ]
      message: "<red>I letti esplodono qui. Te lo sto risparmiando."

Languages

The texts the plugin shows to players, one file per language.

lang/

Texts and messages
2 files
plugins/ShadowRegions/lang/
File notes

This is the one file that is meant to be translated. Everything a player reads lives here; nothing here is syntax.

MiniMessage format. Placeholders are written <like-this> and their names are fixed: keep them, move them, but do not rename them. A key missing here is taken from the copy of this same language inside the jar first, then from the default language and from en_US, one key at a time.

A message can be a plain string or a map:

some-key:
  text: "<red>Text"
  channel: ACTION_BAR      # CHAT | ACTION_BAR | TITLE | SUBTITLE | NONE
  sound: block.note_block.bass
  volume: 0.7
  pitch: 0.8
  cooldown: "2s"           # anti spam, per player

Careful with keys like "on", "off", "yes" and "no": YAML reads them as true/false unless they are quoted. Write them as "on": and "off":.

Every message the plugin shows to players, one file per language. The keys are not listed one by one: here are the files, how many texts they hold and the placeholders they use.

FileLanguageTexts
lang/en_US.yml reference English 1,097
lang/it_IT.yml Italiano 1,097

Most used placeholders

The plugin replaces them with the right value: leave them written as they are.

  • <prefix>
  • <region>
  • <count>
  • <flag>
  • <world>
  • <value>
  • <volume>
  • <name>
  • <x>
  • <z>
  • <y>
  • <max>
  • <size-x>
  • <size-y>

Message groups

  • prefix 1
  • common 9
  • help 56
  • command 9
  • selection 29
  • region 66
  • info 11
  • member 8
  • flag 36
  • protection 22
  • editor 10
  • preview 4
  • admin 72
  • dynmap 4
  • confirm 6
  • input 22
  • gui 4
  • menu 334
  • preset 18
  • blacklist 10
  • condition 20
  • stats 9
  • rollback 12
  • guide 7
  • create 1
  • flag-category 9
  • flag-type 10
  • flag-desc 149
  • flag-name 149

Other

Ready-made content, examples, imports: the files you copy and edit as a model.

presets/

Region presets
9 files
plugins/ShadowRegions/presets/

9 files with the same structure. Below, 4 of them in full, one for each different shape; the others are listed by name.

  • arena-pvp.yml
  • home.yml
  • jail.yml
  • museum.yml
  • no-protection.yml
  • public-farm.yml
  • safe-zone.yml
  • shop.yml
  • spawn.yml

Example presets/public-farm.yml

File notes

Preset "public-farm": everybody harvests, nobody destroys.

build: deny is the wall. block-break and block-place open one door in it and allowed-blocks decides how wide that door is: a material that is not on the list is stopped before the build check even runs. The crops keep changing hands, the fences, the water and the chests stay exactly where they are.

Name and description come from lang/<language>.yml, under preset.public-farm: write the words here instead to show the same ones in every language.

name"lang:preset.public-farm.name"
description"lang:preset.public-farm.description"
iconWHEAT
flags15 keys
builddeny
block-breakallow
block-placeallow
allowed-blocks"WHEAT, CARROTS, POTATOES, BEETROOTS, NETHER_WART, MELON, MELON_STEM, PUMPKIN, PUMPKIN_STEM, SUGAR_CANE, BAMBOO, COCOA, SWEET_BERRY_BUSH, CACTUS, TORCHFLOWER_CROP, PITCHER_CROP"
interactallow
useallow
chest-accessdeny
trampledeny
crop-growthallow
pvpdeny
mob-spawningdeny
tntdeny
fire-spreaddeny
lava-firedeny
lighterdeny

Example presets/spawn.yml

File notes

Preset "spawn": the front door of the server.

Nobody builds here: with no members on the region the engine already says no. But doors, buttons, plates and crafting tables have to work, or the spawn build is furniture nobody can touch. "use" does not cover containers, so the chests stay shut all the same.

Name and description come from lang/<language>.yml, under preset.spawn: write the words here instead to show the same ones in every language.

name"lang:preset.spawn.name"
description"lang:preset.spawn.description"
iconBEACON
flags15 keys
useallow
pvpdeny
mob-spawningdeny
mob-damagedeny
fall-damagedeny
fire-damagedeny
drowning-damagedeny
tntdeny
creeper-explosiondeny
other-explosiondeny
fire-spreaddeny
lighterdeny
item-dropdeny
hunger-draindeny
passthroughdeny

Example presets/jail.yml

File notes

Preset "jail": you go in, you do not walk out.

exit is the flag doing the work; the two teleport flags close the usual ways around it. Whoever holds the bypass permission is never held.

Name and description come from lang/<language>.yml, under preset.jail: write the words here instead to show the same ones in every language.

name"lang:preset.jail.name"
description"lang:preset.jail.description"
iconIRON_BARS
flags15 keys
exitdeny
exit-via-teleportdeny
enderpearldeny
chorus-fruit-teleportdeny
flydeny
builddeny
interactdeny
usedeny
chest-accessdeny
pvpdeny
mob-spawningdeny
mob-damagedeny
item-dropdeny
item-pickupdeny
hunger-draindeny

Example presets/museum.yml

File notes

Preset "museum": look, do not touch.

Name and description come from lang/<language>.yml, under preset.museum: write the words here instead to show the same ones in every language.

name"lang:preset.museum.name"
description"lang:preset.museum.description"
iconITEM_FRAME
flags12 keys
builddeny
interactdeny
usedeny
chest-accessdeny
item-frame-rotatedeny
entity-item-frame-destroydeny
entity-painting-destroydeny
armor-stand-manipulatedeny
pvpdeny
mob-spawningdeny
invincibleallow
item-dropdeny

All the documentation