-
-
Notifications
You must be signed in to change notification settings - Fork 23
Limit Configuration
This page will explain how the limits work, and how you can configure a limit. Limits are enabled by default for everyone, unless they have the specified bypass permission from the limits config. If someone has this permission, the limit won't be applicable to them.
Currently, Insights supports 3 types of limits:
- Tile - which limits how many tiles a player can place (also known as "Block Entities")
- Group - which limits a group of blocks alltogether
- Permission - which allows the specification of single blocks as a limit.
The basis of a limit yaml must contain at least the following nodes:
limit:
type: "<LIMIT_TYPE>"
bypass-permission: "<BYPASS_PERMISSION>"
<LIMIT_TYPE>
: This is the limit type. Must be one of the following types: TILE
, GROUP
, PERMISSION
.
<BYPASS_PERMISSION>
: Can be any permission you like this limit to have.
The config also allows for extra settings:
limit:
...
settings:
enabled-worlds:
whitelist: false
worlds:
- "<WORLD>"
- ...
enabled-addons:
whitelist: false
addons:
- "<ADDON>"
- ...
disallow-placement-outside-region: <DISALLOW_OUTSIDE_REGIONS>
<WORLD>
: The name of a world this limit should be applied upon (can be either a blacklist or a whitelist depending on the whitelist: boolean
setting).
Note: The name of the world must match exactly!
<ADDON>
: The name of an addon this limit should be applied upon (can be either a blacklist or a whitelist depending on the whitelist: boolean
setting).
Note: The name of the addon must match exactly!
<DISALLOW_OUTSIDE_REGIONS>
: Whether or not to disallow placement of the configured limited blocks outside a region.
For group limits, the following extra nodes exist:
limit:
...
name: "<NAME>"
limit: <LIMIT_COUNT>
regex: <REGEX_ENABLED>
materials:
- "<MATERIAL>"
- ...
entities:
- "<ENTITY_TYPE>"
- ...
<NAME>
: This is the name for the limit which will be displayed to the user when they reached the limit, "You have reached 100x "
<LIMIT_COUNT>
: The maximum count allowed for this particular limit.
<REGEX_ENABLED>
: Whether or not the entries in the materials and entities list should be matched by regex.
<MATERIAL>
: Must be one of the many Materials.
<ENTITY_TYPE>
: Must be one of the following static entities: ITEM_FRAME
, GLOW_ITEM_FRAME
, PAINTING
, ARMOR_STAND
, ENDER_CRYSTAL
. Other entities are not supported by Insights.
For permission limits, the following extra nodes exist:
limit:
...
materials:
<MATERIAL>: <LIMIT_COUNT>
...
entities:
<ENTITY_TYPE>: <LIMIT_COUNT>
...
<LIMIT_COUNT>
: The maximum count allowed for this particular limit.
<MATERIAL>
: Must be one of the many Materials.
<ENTITY_TYPE>
: Must be one of the following static entities: ITEM_FRAME
, GLOW_ITEM_FRAME
, PAINTING
, ARMOR_STAND
, ENDER_CRYSTAL
. Other entities are not supported by Insights.
For tile limits, the following extra nodes exist:
limit:
...
name: "<NAME>"
limit: <LIMIT_COUNT>
excluded-materials:
- "<MATERIAL>"
- ...
<NAME>
: This is the name for the limit which will be displayed to the user when they reached the limit, "You have reached 100x "
<LIMIT_COUNT>
: The maximum count allowed for this particular limit.
<MATERIAL>
: Must be one of the many Materials.
An example of a tile limit (256/chunk or area) can be found below:
limit:
type: "TILE"
bypass-permission: "insights.bypass.limit.tile"
name: "Tiles"
limit: 256
An example of a simple redstone limit (64/chunk or area) can be found below:
limit:
type: "GROUP"
bypass-permission: "insights.bypass.limit.redstone"
name: "Redstone"
limit: 64
materials:
- "REDSTONE_WIRE"
- "REDSTONE_BLOCK"
- "HOPPER"
- "DISPENSER"
- "DROPPER"
- "TRIPWIRE_HOOK"
- "REDSTONE_LAMP"
- "STICKY_PISTON"
- "PISTON"
- "REDSTONE_TORCH"
- "TNT"
- "NOTE_BLOCK"
- "LEVER"
- "REPEATER"
- "COMPARATOR"
An example limit which limits all beds to 16 per chunk/area using a regex group limit:
limit:
type: "GROUP"
bypass-permission: "insights.bypass.limit.beds"
name: "Beds"
limit: 64
regex: true
materials:
- "^.*_BED\\b"