# General Configuration

## SAVE DATABASE DELAY

You can manage the delay for saving data in database. You can set that here:

```yaml
save-database-delay: 300 # in seconds
```

## FLY DECREMENT METHOD

```yaml
fly-decrement-method: PLAYER_FLY_MODE
```

<table><thead><tr><th>Type </th><th>equals</th></tr></thead><tbody><tr><td><pre><code>PLAYER_FLY_MODE
</code></pre></td><td>Seems player will decremente his fly time when he active his fly.</td></tr><tr><td><pre><code>PLAYER_FLYING_MODE
</code></pre></td><td>Seems player will decremente his fly time when he active his fly AND his flying.</td></tr></tbody></table>

## TP ON FLOOR WHEN FLY DISABLED

```yaml
tp-on-floor-when-fly-disabled: true
```

When true, the player will be teleported to the floor when their flytime expired or conditions are not met.

## FLY DECREMENT DISABLED BY STATIC

Need **PLAYER\_FLYING\_MODE** in the fly-decrement-method.

```yaml
fly-decrement-disabled-by-static: false
delay: 3
```

If true, that will stop decrementing  the fly time after 3 seconds.

## PVP / NEARBY PLAYER PART

### Example with Lands

```yaml
pvp:
  enabled-permission-range: true #you can enable the features if needed
  fly-disable-radius: 5
  bypass:
    placeholders:
      - "%lands_land_name_plain%"  # For example : The plugin checks if the land name around a player is the same.
      # If there are a player that return different of all player(in 10 block around), fly will disable.
      #- "%otherPlaceholder%"  # You can put other placeholder if needed.
```

The `fly-disable-radius: 5` configuration refers to the **minimum radius** (in blocks) around a player where flying is **disabled**.

Here’s how it works:

* If a player is within **5 blocks** (as specified by `fly-disable-radius: 5`) of another player, flying is disabled for the first player.
* Essentially, if there are players within this 5-block radius, the plugin will stop the player from flying.

If you want to increase the radius to a larger value (e.g., 10 blocks), you would set:

```yaml
    placeholders:
      - "%lands_land_name_plain%"  # For example : The plugin checks if the land name around a player is the same.
      # If there are a player that return different of all player(in 10 block around), fly will disable.
      #- "%otherPlaceholder%"  # You can put other placeholder if needed.
```

* This placeholder refers to the **name of the land** or area where the player is located.
* The plugin checks if the land name (the area the player is in) is the **same** for the other players in the nearby area (within the specified radius, e.g., 5 blocks).
* If another player in that radius is in a different land (different land name), then the plugin **disables flying** for the player. This ensures that players can't fly around in different zones unless certain conditions are met.

## ALIAS

```yaml
command:
  alias:
  - "wfly manage"
```

This add /wfly manage to disable/enabled the fly..<br>

```yaml
command:
  alias:
  - "wfly manage"
  - "wfly other1"
  - "othercommands"
```

You can add more alias like that!

## DECREMENT OFFLINE

```yaml
#config.yml
decrement-offline: true
```

{% hint style="info" %}
If you are performing maintenance, remember to disable this; players may waste their time flying unnecessarily.
{% endhint %}

## TIMED FLY

The "Timed Fly" feature prevents you from manually adding flight time based on rank. Instead, it automatically assigns flight time to specific groups. Once a player runs out of time and flight is disabled, a cooldown period begins before they can fly again.

{% hint style="info" %}
LuckPerms is required for this feature.
{% endhint %}

<pre class="language-yaml"><code class="lang-yaml">timed-fly:
  enabled: false #if features enabled
  decrement-cooldown-offline: false #if the cooldown decrement offline
  reset-fly-time-after-disable: false ##if after /fly (disable), return to 0 and cooldown
  group:
    nebula: #refer to luckperms group
      cooldown: 30 #in second
      fly-time: 120 #in second
    default:
      cooldown: 60 <a data-footnote-ref href="#user-content-fn-1">#in second</a>
      fly-time: 10 #in second
</code></pre>

This means that if you are in the "default" group, you can fly for 10 seconds. After those 10 seconds are used, you must wait 60 seconds before you can fly again.

[^1]:
