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

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).


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 entities.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.) should be listed individually.

Note: the rule is applied separately for each specified entity type, even if multiple types are listed. Entities of different types will not be considered a single group 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.

-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.


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.
exclude-nametagged boolean If enabled, prevents entities with a nametag from being removed. They will still count towards the limit in groups.