Configuration

The configuration is located in /plugins/FarmLimiter/config.yml. In this page are listed the sections of the configuration, with the default values and information about each option.

If you want to see the full default configuration, click the button below.

Spoiler: default config.yml


Check interval

check-interval: 180

Farm Limiter periodically runs a cleanup task that checks mob farms and eventually removes exceeding entities, based on the rules. check-interval sets the interval in seconds of that periodic task.


Broadcast message

broadcast:
  enable: true
  message: '&6[FarmLimiter]&e Removed {amount} entities.'
  minimum: 1
  require-permission: false

Every time the periodic cleanup task terminates, Farm Limiter broadcasts a message in chat informing how many entities have been removed. You can configure if the message is enabled (enable), the message itself (message), and the minimum amount of removed entities to broadcast the message (minimum). If require-permission is set to true, the message will be displayed only to players with the permission farmlimiter.receive-broadcast.


Rules

rules:
# Generic rule to limit groups of any mob type (except villagers) to 50.
- entities: ALL
  exclude: villager
  worlds: ALL
  distance: 3
  max-amount: 50
# Rule for passive mobs farms, limiting the amount of mobs to 25.
- entities: pig, cow, sheep, chicken
  worlds: ALL
  distance: 5
  max-amount: 25
# Rule for spawner grinders, limiting dense groups of hosting mobs to 10.
- entities: zombie, skeleton, spider, cave spider
  worlds: ALL
  distance: 1
  max-amount: 10

Rules control how mob farms (or groups of entities, in general) should be limited and how many entities to remove. FarmLimiter tries to find groups of nearby entities (based on the distance between them) and eventually removes exceeding entities from group that are too big.

The rules section contains a list of YAML objects, where each object is a single rule.

The recommended way to add a new rule isto copy and paste an existing one, and then edit it.
Don't forget to include the dash at the beginning of each rule!

Each rule has the following options:

Option Value type Description
entities string

List of entity types to check, separated by a comma. Open valid-entity-types.yml to see a list of valid entity types.

ALL can be used to indicate all living mob types. Inanimate objects (boats, armor stands, dropped items, etc.) must be listed individually.

Note: the rule is applied separately for each specified entity type, even if multiple types are listed. Entities of different types are not grouped together even if near.

exclude string List of entity types to exclude from the rule (useful if using ALL in the entities option). This option has higher priority than entity types listed in entities.
worlds string

List of worlds where the rule is active, separated by a comma.

ALL can be used to apply the rule to all the worlds.

distance number

Distance used to determine if two or more entities should be considered part of the same group.

Note: -1 can be used as value to always group together entities of the same type, regardless of the distance. Useful to limit the total amount of entities in each world.

max-amount number

Maximum amount allowed of entities in each group found by this rule, exceeding ones will be removed.
The following criteria determine which mobs are considered the most important to keep, in order:

  1. Tamed mobs
  2. Mobs with a saddle
  3. Mobs with a nametag
  4. Newer mobs (babies are "newer" than adults)

For example, tamed mobs will always have priority over untamed mobs (regardless of other criteria), so untamed mobs will be removed first. If two mobs are both tamed or both untamed, the one with a saddle will have priority over the one without it, and so on.

exclude-tamed (optional) boolean

Sets if tamed entities should be excluded or not, overriding the global value in extra > exclude-tamed.

exclude-nametagged (optional) boolean

Sets if entities with a nametag should be excluded or not, overriding the global value in extra > exclude-nametagged.


Group separately

group-separately:
  mythic-mobs: false

If you enable this option, MythicMobs will not be grouped with normal entities. Instead, they will have their own type, based on their internal name, and you will have to explicitly add them to rules (in entities or exclude).

The format is MythicMobs:<internal name>. You can use MythicMobs:ALL to apply a rule to all MythicMobs types (different types of MythicMobs will not be grouped together, as with normal entities).

Example (the rule would apply to creepers and to all MythicMobs except SkeletonKing):

rules:
- entities: MythicMobs:ALL, creeper
  exclude: MythicMobs:SkeletonKing
  ...

Extra

extra:
  portal-spawn-rate: '100%'
  exclude-tamed: true
  exclude-nametagged: false


Option Value type Description
portal-spawn-rate number Reduces the spawn rate of mobs from nether portals, by keeping only a percentage of mobs spawned in this way (others will be removed). If set to 100% the spawn rate is not changed, if set to 0% mobs will not spawn from portals.
exclude-tamed boolean If enabled, prevents tamed entities from being removed. They will still count towards the limit in groups. Individual rules can override this value.
exclude-nametagged boolean If enabled, prevents entities with a nametag from being removed. They will still count towards the limit in groups. Individual rules can override this value.