📃Conditions

Conditions on a Minecraft server are essential to establish specific requirements before activating effects or triggers. Here are some of the most relevant conditions, each with its function in the context of a Minecraft plugin:

Example of Use:

  - id: random_teleport
    args:
      radius: 5.0 #Radius in blocks
    triggers:
      - player_drop_item
    filter:
      items:
        - ENDER_PEARL
    conditions:
      - id: placeholder
        args:
          regex: ">=" # ==, >=, <=, >, <, equals, equalsIgnoreCase
          input: "%vault_eco_balance%"
          output: "100"
      - id: placeholder
        args:
          regex: ">"
          input: "%server_total_living_entities%"
          output: "1"

Revert conditions:

Just as conditions return true if they are met, they can also be reversed. Here is the following example:

    effects:
      - id: create_hologram
        args:
          holograms:
            - "&c&lYOUR"
            - "&e&lDEATH"
          duration: 10
          separation: 1.0
        conditions:
          - id: has_item
            args:
              slot: HEAD
              reverse: true
        triggers:
          - player_death

Here in this example 2 holograms are being created, but they will only be generated if the reverted condition is true, instead of verifying if the player has an item in his head, it is verified if he does not have an item in his head.

Effects not Fulfilled:

Unmet effects are effects that are executed if a condition is not met.

    effects:
      - id: create_hologram
        args:
          holograms:
            - "&c&lYOUR"
            - "&e&lDEATH"
          duration: 10
          separation: 1.0
          - id: has_permission
            args:
              permission: "featherelection.election.kill"
            unfulfilled-effects:
              - id: send_message
                args:
                  message: "&cNo tienes permisos para morir!"
        triggers:
          - player_death

These conditions allow server administrators to set precise criteria for the execution of events, providing an additional level of customization in gameplay. From permission requirements to conditions based on health, experience level, biomes, and the layout of inventory items, these conditions offer considerable versatility to tailor the gameplay experience to the specific needs of the server.

It is important to note that using the placeholder condition requires the installation and configuration of the PlaceholderAPI for full functionality. With these conditions, administrators can create custom challenges, rewards, and events that enrich players' experience in the world of Minecraft. Let the adventures be guided by the precise conditions of the server! 🚀🎮

Last updated