# Conditions

\
***⚠️ DON'T USE ANY FLAGS PLUGIN(worldguard etc etc), THAT MAY CAUSE CONFLICT⚠️***&#x20;

## Auto reactivate fly after condition disable fly

```yaml
auto-reactivate-fly-after-conditions-disable: true

```

It seems that if flying has been disabled by a condition, after the player enters a new area where that condition does not block flying, flying will automatically be reactivated.

### Make conditions

Nothing beats examples for long, unecessary explanations

```yaml
fly-rules:
  # 1. Admins bypass everything
  admin_bypass:
    priority: 0
    conditions:
      perm:
        type: has_permission
        permission: "fly.admin"
    result: ALLOW

  # 2. No flying during combat!
  combat_check:
    priority: 1
    conditions:
      in_combat:
        type: string_equals
        input: "%combatlogx_in_combat%"
        value: "true"
    result: DENY
    actions:
      - '[actionbar] &cCombat in progress...'

  # 3. Flight allowed at Spawn
  spawn_fly:
    priority: 10
    conditions:
      in_spawn:
        type: string_equals_ignorecase
        input: "%worldguard_region_name%"
        value: "spawn"
    result: ALLOW
    actions:
      - '[actionbar] &bSafe Zone'

  # 4. Default: DENY
  # If player is not admin, not in combat, and not at spawn -> NO FLIGHT.
  default_deny:
    priority: 999
    result: DENY
    actions:
      - '[message] &cYou are not allowed to fly here.'
```

## This part :&#x20;

```yaml
  default_deny:
    priority: 999
    result: DENY
    actions:
      - '[message] &cYou are not allowed to fly here.'
```

This section is important; it allows you to manage what the plugin returns by default if you use `allow`.

This means that if you have no conditions set with higher priorities, it will either prevent or allow the player from flying.

## Result

The result mean if this condition allow player to fly.

## Priority

{% embed url="<https://wiki.helpch.at/helpchat-plugins/deluxemenus/options-and-configurations/item#priority>" %}

(cf: DeluxeMenu for the idea)

| TYPE                       | ACTIONS      |
| -------------------------- | ------------ |
| string\_equals\_ignorecase | \[message]   |
| string\_equals             | \[actionbar] |
| has\_permission            | \[command]   |
| ... (ask for new type)     | \[player]    |
| ... (ask for new type)     | \[sound]     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wayfly-documentation.gitbook.io/wayfly-wiki/configurations/conditions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
