Conditions

In this page you will learn how to make an exception to some actions using condition

Condition can be inside a list, for example:

...:
    - Type: HAS_PERMISSION
      Permission: example.test

another example:

Conditions:
    - Type: HAS_PERMISSION
      Permission: example.test
    - Type: HAS_PERMISSION
      Permission: test.example

or, it can be a section, for example:

Type: HAS_PERMISSION
Permission: example.test

Condition Types

HAS_PERMISSION

This checks whether theentity has the required permission

Type: HAS_PERMISSION
Permission: <permission>
Negate: <true/false>

If negate is true, then it will pass if the entity does NOT have the permission instead

IS_HOLDING

This checks whether the entity is holding an item

Type: IS_HOLDING
Item: <item>
Negate: <true/false>

IS_ITEM_IN_HAND_ENCHANTED

This checks whether the item held by the entity is enchanted

Type: IS_ITEM_IN_HAND_ENCHANTED
Enchantment: <enchantment type>
Level: <minimum leve required to pass>
Negate: <true/false>

WORLD_WHITELIST

This checks whether the entity is inside the whitelisted world

Type: WORLD_WHITELIST
World List: 
- list
- of
- worlds
Negate: <true/false>

HAS_ITEM

This checks whether the entity has the item inside the inventory

Type: HAS_ITEM
Item: <item>
Negate: <true/false>

HAS_EFFECT

This checks whether the entity has the potion effect or not

Type: HAS_EFFECT
Effect: <potion effect type>
Negate: <true/false>

TYPE_FILTER

This checks whether the entity type is allowed or not

Type: TYPE_FILTER
Filter: <filter>
Negate: <true/false>

Filter Types

  • CREATURE This allows every creature

  • TAMED This allows every tamed animals

  • ANIMALS This allows every animals

  • MONSTER This allows every monster

  • <ENTITY TYPE> This allows specific type to be filtered

You can combine more than 1 entity filter using boolean logic, for example, if you want to combine effects and those effects required to be passed, you can use "and" or "&&" or "&", for example:

Filter: ANIMALS AND ZOMBIE aNd TAMED and PLAYER
Filter: MONSTER && PLAYER
Filter: PLAYER & WOLF & VILLAGER

if you want to combine effects and only need one filter to pass, you can use "or" or "||" or "|", for example:

Filter: ANIMALS OR ZOMBIE Or TAMED or PLAYER
Filter: MONSTER || PLAYER || WITHER
Filter: PLAYER | WOLF | WITHER | VILLAGER

if you want to combine effects and only one filter can pass, you can use "xor" or "^", for example:

Filter: ANIMALS XOR ZOMBIE xOr TAMED xor PLAYER
Filter: ANIMALS ^ PLAYER ^ WITHER

You can also combine more than 1 boolean logic and group them with parenthesis, for example:

Filter: PLAYER OR (ANIMALS AND TAMED) XOR VILLAGER

POWER_REQUIREMENT

This checks whether the beacon pass the power requirement

Type: POWER_REQUIREMENT
Minimum: [minimum power, optional]
Maximum: [maximum power, optional]
Negate: <true/false>

FREE_POWER_REQUIREMENT

This checks whether the beacon pass the power requirement remaining

Type: FREE_POWER_REQUIREMENT
Minimum: [minimum free power, optional]
Maximum: [maximum free power, optional]
Negate: <true/false>

AND_LOGIC

Combines two or more conditions, needs all condition to be valid/pass

Type: AND_LOGIC
Conditions: <list of conditions>

Example:

Type: AND_LOGIC
Conditions:
- Type: HAS_PERMISSION
  Permission: server.admin
- Type: TYPE_FILTER
  Filter: PLAYER

OR_LOGIC

Combines two or more conditions, only need one condition to be valid/pass

Type: OR_LOGIC
Conditions:
- Type: HAS_PERMISSION
  Permission: server.admin
- Type: HAS_PERMISSION
  Permission: server.vip

PLOTSQUARED_IS_IN_PLOT

Checks whether the beacon is inside a plot

Type: PLOTSQUARED_IS_IN_PLOT
Negate: <true/false>

Requires PlotSquared

PLOTSQUARED_IS_SAME_PLOT

Checks whether the beacon and the target entity is in the same plot

Type: PLOTSQUARED_IS_SAME_PLOT
Negate: <true/false>

Requires PlotSquared

PLOTSQUARED_IS_IN_PLOT_AREA

Checks whether the beacon is in a plot area

Type: PLOTSQUARED_IS_IN_PLOT_AREA
Negate: <true/false>

Requires PlotSquared

PLOTSQUARED_IS_SAME_PLOT_AREA

Checks whether the beacon and the target entity is in the same plot area

Type: PLOTSQUARED_IS_SAME_PLOT_AREA
Negate: <true/false>

Requires PlotSquared

GRIEFPREVENTION_SAME_CLAIM

Checks whether the beacon and the target entity is in the same claim area

Type: GRIEFPREVENTION_SAME_CLAIM
Negate: <true/false>

Requires GriefPrevention

GRIEFPREVENTION_PERMISSION

Checks whether the player has GriefPrevention claim permission

Type: GRIEFPREVENTION_PERMISSION
Permission: <Edit/Build/Inventory/Access/Manage>
Negate: <true/false>

Requires GriefPrevention

GRIEFPREVENTION_OWNER

Checks whether the player is the land/claim owner

Type: GRIEFPREVENTION_OPWNER
Negate: <true/false>

Requires GriefPrevention

GRIEFPREVENTION_CLAIMED

Checks whether the beacon is in claimed land

Type: GRIEFPREVENTION_CLAIMED
Negate: <true/false>

Requires GriefPrevention

FACTIONS_IN_FACTION

Checks whether the beacon is inside faction land

Type: FACTIONS_IN_FACTION
Negate: <true/false>
Faction: [faction name, optional]
Faction Id: [faction id, optional]

Requires either Factions, FactionsX, FactionsBlue, KingdomsX, Kingdoms, LegacyFactions, MedievalFactions, UltimateFactions, Towny, or Improved Factions

FACTIONS_IN_SAME_FACTION

Checks whether the beacon and the target entity is in the same faction land

Type: FACTIONS_IN_SAME_FACTION
Negate: <true/false>

Requires either Factions, FactionsX, FactionsBlue, KingdomsX, Kingdoms, LegacyFactions, MedievalFactions, UltimateFactions, Towny, or Improved Factions

FACTIONS_IS_ROLE

Checks the target entity role inside a faction

Type: FACTIONS_IS_ROLE
Role: <role>
Compare To Current Location Faction: <true|false>

If Compare To Current Location Faction is true then it will compare if the role belongs to the faction at the entity location

Requires either Factions, FactionsX, FactionsBlue, KingdomsX, Kingdoms, LegacyFactions, MedievalFactions, UltimateFactions, Towny, or Improved Factions

TOTAL_ACTIVE_BEACON_EFFECTS

Checks how many active beacon effects on a beacon

Type: TOTAL_ACTIVE_BEACON_EFFECTS
Minimum: [optional]
Maximum: [optional]

If the minimum is specified and the total is less than the minimum, it will not pass the check

If the maximum is specified and the total is greater than the maximum, it will not pass the check

If you use this condition on the effect config, players still can upgrade and activate more than the minimum and maximum range specified in the config, but when the total is outside of the range, it will deactivate the effect.

NESTING CONDITION

You can combine AND LOGIC and OR LOGIC, for example:

Type: OR_LOGIC
Conditions:
- Type: HAS_PERMISSION
  Permission: server.admin
- Type: AND_LOGIC
  Conditions:
  - Type: HAS_PERMISSION
    Permission: server.vip
  - Type: HAS_PERMISSION
    Permission: server.mvp
  - Type: OR_LOGIC
    Conditions:
    - Type: HAS_PERMISSION
      Permission: server.test
    - Type: HAS_PERMISSION
      Permission: test.server

Last updated