> For the complete documentation index, see [llms.txt](https://wayfly-documentation.gitbook.io/wayfly-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wayfly-documentation.gitbook.io/wayfly-wiki/configurations/conditions.md).

# 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 (Premium : 2 max for free version)

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]             |
| string\_contains\_ignorecase | \[player]              |
| string\_contains             | \[sound]               |
| ... (ask for new type)       | ... (ask for new type) |
| ... (ask for new type)       | ... (ask for new type) |
