Adds info about how to configure the plugin

This commit is contained in:
Kristian Knarvik 2023-12-17 04:07:51 +01:00
parent e233e5d918
commit 37a773511d
4 changed files with 41 additions and 19 deletions

View File

@ -8,3 +8,25 @@ restrictions, like denying item dropping, and denying any sell commands within t
## Dependencies
- WorldGuard
## Configuration
Add the identifier (name or UUID) of the world you want to specify a region for as a sub-key of clearRegions. Make sure
your world identifier is a string list "worldName: []", and add any regions you want to enable inventory clearing for to
the list of the world the region belongs to.
Example config:
```yaml
clearRegions:
world:
- "creative_building"
- "clear"
```
or
```yaml
clearRegions:
world: [ "creative_building", "clear" ]
```

View File

@ -105,7 +105,7 @@ public class WorldGuardListener implements Listener {
/**
* Gets all regions set as clear regions the player currently occupies
*
* @param playerWorld <p>The world the player is currently in</p>
* @param playerWorld <p>The world the player is currently in</p>
* @param playerRegions <p>The regions the player is in or will be in</p>
* @return <p>All clear regions found in playerRegions</p>
*/

View File

@ -2,6 +2,6 @@
clearRegions:
# The name or UUID of a world. Add any regions that should force inventory clearing as a comma-separated list inside
# the square parentheses.
world: []
world_nether: []
world_the_end: []
world: [ ]
world_nether: [ ]
world_the_end: [ ]