# Conditions and Criterias

## What is this?

This option decides whether an action is allowed to be done or not.

```yaml
Break Condition:
    Criteria: LOGIC_OR
    Conditions:
    -   Criteria: IS_OWNER
    -   Criteria: HAS_PERMISSION
        Permission: fancywaystones.admin
```

Based on the example above, the condition is accepted if the player is owned of the waystone, or has the permission `fancywaystones.admin`

## Criterias

### RANDOM

Random will accept condition in percentage chance. The options are:

* `Chance` the percentage chance of the condition will be accepted

For example:

```yaml
Break Condition:
    Criteria: RANDOM
    Chance: 69
```

The example above will accept the condition if the player is lucky enough to have the 69% chance.

### ENCHANTED

Enchanted will accept the condition if the player is holding any item that is enchanted. The options are:

* `Type` the enchantment type. (See <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html>)
* `Level` the minimum enchantment level

For example:

```yaml
Break Condition:
    Criteria: ENCHANTED
    Type: SILK_TOUCH
    Level: 1
```

The example above will accept the condition if the player is holding any tool with silk touch enchantment (minimum level 1)

### EFFECT

Effect will accept the condition if the player is having a potion effect. The options are:

* `Type` the potion effect type. (See <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html>)
* `Level` the minimum amplifier level

For example:

```yaml
Break Condition:
    Criteria: EFFECT
    Type: DOLPHINS_GRACE
    Level: 0
```

The example above will accept the condition if the player has Dolphin grace effect.

### LAND\_ACCESS

Land access will accept the condition if the player has the access to build on that region.

For example:

```yaml
Break Condition:
    Criteria: LAND_ACCESS
```

### HAS\_LAND\_ACCESS

Same as Land Access

### IS\_MEMBER

Is Member will accept if the player is whitelisted on the waystone

For example:

```yaml
Break Condition:
    Criteria: IS_MEMBER
```

### HAS\_PERMISSION

will accept if the player has the permission required

For example:

```yaml
Break Condition:
    Criteria: HAS_PERMISSION
    Permission: 'fancywaystones.admin'
```

### IS\_OWNER

will accept if the player is the owner of the waystone

For example:

```yaml
Break Condition:
    Criteria: IS_OWNER
```

### IS\_EXPLOSION

will accept if the condition occurred by an explosion (TNT, Creeper, etc)

For example:

```yaml
Break Condition:
    Criteria: IS_EXPLOSION
```

### WORLD\_WHITELIST

will accept if the condition occurred in the world that is listed.

For example:

```yaml
Break Condition:
    Criteria: WORLD_WHITELIST
    Worlds:
    - world
    - world_nether
    - world_the_end
```

### TYPE\_WHITELIST

will accept the condition if the waystone type is listed.

For example:

```yaml
Break Condition:
    Criteria: TYPE_WHITELIST
    Types:
    - public
    - public_normal
    - public_nether
    - public_the_end
```

### WHITELISTED\_ENTITIES

This criteria is used for Entity Teleportation. See [Customize Waystone](/fancywaystones/fancy-waystones/customize-waystone.md#how-do-i-disable-teleport-with-attached-entities-feature)for usage

### OFFSET\_DISTANCE

will accept if the offset distance set by the player for the waystone is in a specific range of distance.

* `Min Distance` the minimum distance of the offset distance
* `Max Distance` the maximum distance of the offset distance

### IS\_HOLDING

will accept if the player is holding the item specified in the config

```yaml
Break Condition:
    Criteria: IS_HOLDING
    Display Name: 'Super Omegalol Pickaxe'
    Item:
        type: NETHERITE_PICKAXE
        amount: 2
```

The `Display Name` option is used to alter the display name for the item when shown in the chat. This option is optional.

### LOGIC\_NEGATE

will negate the condition. If the criteria inside accept the condition, it will negate it.

```yaml
Break Condition:
    Criteria: LOGIC_NEGATE
    Condition:
        Criteria: IS_HOLDING
        Item:
            type: DIRT
```

The example above will accept the condition if the player is NOT holding a dirt.

### LOGIC\_OR

will accept the condition if any of the criteria inside accept the condition.

```yaml
Break Condition:
    Criteria: LOGIC_OR
    Conditions:
    - Criteria: EFFECT
      Type: SPEED
      Level: 0
    - Criteria: EFFECT
      Type: JUMP
      Level: 0
```

The example above will accept the condition if the player has speed effect OR if the player has jump effect.

### LOGIC\_AND

Similar to logic\_or, but will accept if all of the criteria inside accept the condition.

```yaml
Break Condition:
    Criteria: LOGIC_AND
    Conditions:
    - Criteria: IS_HOLDING
      Item:
          type: DIAMOND_PICKAXE
    - Criteria: LOGIC_OR
      Conditions:
      - Criteria: ENCHANTED
        Type: SILK_TOUCH
        Level: 1
      - Criteria: EFFECT
        Type: DIG_SPEED
        Level: 0
```

The example above will accept the condition if the player is holding a diamond pickaxe and (enchanted with silk touch or has fast mining effect)

### IS\_ENVIRONMENT

will accept if the condition occurred in an environment

```yaml
Break Condition:
    Criteria: IS_ENVIRONMENT
    Environment: NETHER
```

### HAS\_CONTEXT

will accept if the condition occurred in a context

```yaml
Visit Condition:
    Criteria: HAS_CONTEXT
    Context: WARPSTONE
```

The example above will accept the condition if there is Warpstone Context. In other words, the player will be teleported if theyre using warpstone to teleport to the waystone.

### STRING\_MATCHES

If you are using PlaceholderAPI, you can use this to test if the value of 2 placeholders is the same.

```yaml
Break Condition:
    Criteria: STRING_MATCHES
    A: '{player_name}'
    B: 'Septogeddon'
    Reason: 'You must be Septogeddon to do this'
    Reason Negate: 'You must not be Septogeddon to do this'
    Ignore Case: false
```

### ALWAYS

always accept the condition

### NEVER

never accept the condition

### IS\_WAYSTONE\_ACTIVATED

will accept if the waystone is activated, similar to IS\_MEMBER but only if the player actually discover it.

### IS\_NATURAL

will accept if the waystone is generated naturally using structure

### IS\_SAME\_TYPE

will accept if the target waystone and the source waystone is the same type

### IS\_SAME\_WORLD

will accept if the teleportation occurred in the same world

### IS\_SAME\_SERVER

will accept if the teleportation occurred in the same server

### IS\_SAME\_DIMENSION

will accept if the teleportation occurred in the same dimension


---

# 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://septogeddon.gitbook.io/fancywaystones/fancy-waystones/conditions-and-criterias.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.
