# Configuration

### Commands in World Shift

In this section you can execute commands if the player changes world, you can check if the player is in parkour and add a delay before executing the command list.

```yaml
worlds:
  '1':
    name: Spawn
    commands:
    - itemjoin getAll <player>
    checkParkour: false
    delaySeconds: 0
  '2':
    name: Parcelas
    commands:
    - itemjoin getAll <player>
    checkParkour: false
    delaySeconds: 0
  '3':
    name: Parkours
    commands:
    - itemjoin getAll <player>
    checkParkour: true
    delaySeconds: 40
```



***

### World Protection

### Enabled worlds

This function is designed exclusively for the protection of worlds. You can add the worlds you want to protect or specify the blocks whose interaction you want to block.

```yaml
protect:
  enabledworlds:
  - "Spawn"
  - "Parkours"
  - "Challenges"
  - "TheEnd"
  - "TheNether"
  BlockFormEvent: true
  BlockFromToEvent: true
  onBreakCrop: true
  HangingBreakByEntityEvent: true
  EntityDamageEvent: true
  EntityExplodeEvent: true
  EntityDeathEvent: true
  BlockBreakEvent: true
  BlockPlaceEvent: true
  FoodLevelChangeEvent: true
  WeatherChangeEvent: true
  PlayerBedEnterEvent: true
```

With this configuration section, you will be able to protect your world, to avoid the use of worldguard.

1. You can also block the interaction of blocks, for example when opening a chest, shulker, hopper and so on.
2. Use the permission: `prevent.required.opBypass` to overlook events \
   \
   **BlockBreakEvent**\
   **BlockPlaceEvent**\
   **PlayerInteractEvent**\
   **HangingBreakByEntityEvent**

Here you can find a visual aid on how it works.

<figure><img src="https://3017079021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh3w1m9cr2njPE7BpeCwf%2Fuploads%2Ffp2KRpCzNSf9vcfdO1F8%2FGIF3.gif?alt=media&#x26;token=5255168f-b4db-4e12-9b5e-b4b821972e54" alt=""><figcaption></figcaption></figure>

This is the list of blocks added by default, which will be blocked for all users without exception.

```yaml
protect:
  spawn:
    interactBlocked:
    - ENCHANTMENT_TABLE
    - ANVIL
    - BEACON
    - CRAFTING_TABLE
    - WOODEN_DOOR
    - TRAPDOOR
    - OAK_TRAPDOOR
    - ACACIA_DOOR
    - DARK_OAK_DOOR
    - STONE_BUTTON
    - WOOD_BUTTON
    - DROPPER
    - DISPENSER
    - HOPPER
    - HOPPER_MINECART
    - NOTE_BLOCK
    - LEVER
    - FENCE_GATE
    - REDSTONE_COMPARATOR_OFF
    - REDSTONE_COMPARATOR_ON
    - REDSTONE_LAMP_OFF
    - REDSTONE_LAMP_ON
    - BED
    - CHEST
    - LAVA_BUCKET
    - WATER_BUCKET
    - JUKEBOX
    - FURNACE
    - ENDER_PORTAL
    - EYE_OF_ENDER
    - TNT
    - WORKBENCH
```



***

### Spawn location

This will be the location where players will be teleported to once they finish a parkour or enter the mode.\
\
To configure this option from the game, you must go to the location you want, then use the command: `/parkouraddon setloc spawn`

this will set the spawn point correctly.

```yaml
Locations:
  Spawn:
    world: Spawn
    x: 3.26263980326354
    y: 65.0
    z: 1.5261336281181548
    yaw: 90.282104
    pitch: 0.7499262
```

```yaml
Parkour:
  spawn3x3: true
```

<figure><img src="https://3017079021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh3w1m9cr2njPE7BpeCwf%2Fuploads%2F7YJWM1abckw6Q1jGyi8W%2F6b1c405101d00fc01689b2fdf4a66a58bf75ffa8.gif?alt=media&#x26;token=3ee352fc-5474-4f8a-b778-2993d8007f8b" alt=""><figcaption></figcaption></figure>

Based on the following image, you should set the spawn point to `D(0.0)` Once configured and with the option `spawn3x3: true` \
The spawn point will become 3x3 and generate random locations for users to be teleported to.

<figure><img src="https://3017079021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh3w1m9cr2njPE7BpeCwf%2Fuploads%2FGGzhCgcbiOc1YNS3hw5z%2Fimage.png?alt=media&#x26;token=d7ad89a7-8882-421c-8178-27eb24a01300" alt=""><figcaption></figcaption></figure>

***

### Join



1. **enabled**: With "enabled" set to "true", the specified actions are enabled when a player joins the server.
2. **forceSpawn:** Teleports the player to the spawn point defined in `/parkouraddon setloc spawn`
3. **setGameMode**: This sets the game mode for the player when joining the server. In this case, it is set to "ADVENTURE", which will change the player's game mode to Adventure.
4. **setAllowFlight**: When set to "false", this disables the player's ability to fly when joining the server.
5. **resetExp:** With "true" set, this means that the player's experience (XP) will be reset to zero when joining the server. This can be useful to prevent players from keeping experience earned in other modes or activities.
6. **setHeldItemSlot**: This sets the item slot number that the player will have in hand when joining the server. In this case, it is set to "0", meaning that the player will have the item in the first slot of their inventory.

**Regenerate**: Here, actions related to the player's regeneration upon joining the server are being specified.

1. Health: true indicates that the player's health will regenerate when joining the server.&#x20;
2. Saturation: true means that the player's saturation will be regenerated when joining the server.

```yaml
Parkour:
  join:
    forceSpawn: true
    enabled: true
    setGameMode: ADVENTURE
    setAllowFlight: false
    resetExp: true
    setHeldItemSlot: 0
    regenerate:
      Health: true
      Saturation: true
```

***

### GIve Effects

This option will allow you to give multiple effects to players who initiate parkour.

This setting is designed to give players a Regeneration effect with a (permanent) duration when participating in parkour. You can customize this setting by adjusting the effect, the duration and the amplifier according to your needs.

```yaml
Parkour:
  effect:
    enabled: true
    potioneffect:
    #<effect>;<duration>;<amplifier>
    - REGENERATION;999999;1
```

***

### Controller (Next)

The controller is a feature that manages messages sent to the player once they have completed a parkour. The available options are detailed below:

1. You can activate or deactivate this function completely according to your needs.

```yaml
enabled: true
```

2. If you want there to be a short delay before the message is sent to the player after completing a parkour, you can set the "delay" property.

```yaml
delay: 20
```

3. In the controller section, you can specify the parts of the parkour that the player must complete. Use a semicolon (;) to separate and define consecutive sections of the parkour. The syntax for doing this is:

```yaml
controller:
  - "<completeparkour>;<nextparkour>"
```

<figure><img src="https://3017079021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh3w1m9cr2njPE7BpeCwf%2Fuploads%2FryudgoWkqxbyurgn4L60%2F1d373632847a26120c4c8e205163ea42979cbb99.jpg?alt=media&#x26;token=08ff60a4-72f3-4ec7-8931-b589e81c3050" alt=""><figcaption></figcaption></figure>

4. Set the delay to  `-1` to disable the delay, this usually fixes some placeholders such as current deaths

```yaml
Parkour:  
  next:
    enabled: true
    delay: 20
    controller:
      - "planeta-i,planeta-ii"
      - "planeta-ii,helix-i"
      - "helix-i,helix-ii"
      - "helix-ii,overworld"
      - "overworld,thenether"
      - "thenether,theend"
      - "theend,espiral-i"
      - "espiral-i,espiral-ii"
      - "espiral-ii,espiral-iii"
      - "espiral-iii,biomas"
      - "biomas,piramide"
      - "piramide,barranco"
      - "barranco,escalada"
      - "escalada,paraiso-i"
      - "paraiso-i,paraiso-ii"
      - "paraiso-ii,crazy"
      - "crazy,race"
      - "race,franja-i"
      - "franja-i,franja-ii"
      - "franja-ii,remolino"
      - "remolino,stairs"
      - "stairs,adn"
      - "adn,cube"
      - "cube,arch"
      - "arch,square"
      - "square,triangle"
      - "triangle,minipyramid"
      - "minipyramid,e1"
      #CHALLENGES
      - "e1,e2"
      - "e2,e3"
      - "e3,e4"
      - "e4,e5"
      - "e5,e6"
      - "e6,e7"
      - "e7,e8"
      - "e8,e9"
      - "e10,e11"
      - "e11,e12"
      - "e12,e13"
      - "e13,e14"
      - "e14,e15"
      - "e15,m1"
      #Medium
      - "m1,m2"
      - "m2,m3"
      - "m3,m4"
      - "m4,m5"
      - "m5,m6"
      - "m6,m7"
      - "m7,m8"
      - "m8,m9"
      - "m9,m10"
      - "m10,m11"
      - "m11,m12"
      - "m12,m13"
      - "m13,m14"
      - "m14,m15"
     #Medium
      - "m15,h1"
      - "h1,h2"
      - "h2,h3"
      - "h3,h4"
      - "h4,h5"
      - "h5,h6"
      - "h6,h7"
      - "h7,h8"
      - "h8,h9"
      - "h9,h10"
      - "h10,h11"
      - "h11,h12"
      - "h12,h13"
      - "h13,h14"
      - "h14,h15"
      #SpeedRuns
      - "h15,speedrun-i"
      - "speedrun-i,speedrun-ii"
```

***

### Automatic Hologram System

This hologram system works as follows:

1. Hologram enabled (`enabled: true`): First, you can enable or disable holograms according to your preference. If you set "enabled" to "true", the holograms will be enabled and visible. If you set it to "false", the holograms will be disabled and will not be displayed.\

2. Hologram height (`ylocation: 0.0`): You can adjust the height at which the holograms will be displayed. The "ylocation" property allows you to specify the vertical position of the hologram. You can customize this height so that the holograms appear at the height you want.\

3. It is important to note that this hologram system is automatically activated when the server is turned on.\

4. In addition, when you create a new parkour, the holograms are automatically generated when the server is restarted. This automation makes it easy to create and manage holograms on your server.\

5. Finally, if at any time you wish to completely disable this hologram feature, you can do so by setting "enabled" to "false". This gives you full control over whether or not you want to use holograms on your game server.

```yaml
Parkour:  
  hologram:
    enabled: true
    ylocation: 0.0
```

***

### Give Item Shop

You will be able to control and modify the items that will be delivered when the player joins a parkour.

* **`material`**: Specifies the type of material for the item. For example, `HEART_OF_THE_SEA` and `DARK_OAK_DOOR` are block or item materials in Minecraft.
* **`slot`**: Represents the position of the item in the inventory. In this case, the item in the "shop" category will occupy position 1, and the item in the "info" category will occupy position 0.
* **`sneaking`**: Indicates whether the player must be sneaking to activate the item. If it's true, then the player must be sneaking for the item to take effect.
* **`displayName`**: The name displayed for the item in the game. It uses a color formatting string with codes like `&a` for green and `&f` for white.
* **`lore`**: A list of text lines providing additional information about the item. It is used to describe the purpose or instructions of the item.
* **`actions`**: A list of actions that will be executed when the player interacts with the item. In this case, the actions are commands that will be run on the server when the player interacts with the item. For example, `[command] dm open effects <player>` indicates that a menu named "effects" will be opened for the player.

```yaml
Parkour:  
  itemsJoinParkour:
    shop:
      material: HEART_OF_THE_SEA
      sneaking: true
      slot: 1
      displayName: '&a&lSTORE &8| &fSHIFT + Right Click'
      lore:
      - '&7Click to open the map menu.'
      actions:
      - '[command] dm open effects <player>'
    info:
      material: DARK_OAK_DOOR
      slot: 0
      sneaking: true
      displayName: '&a&lMAP &8| &fSHIFT + Right Click'
      lore:
      - '&7Click to open the store menu.'
      actions:
      - '[command] dm open parkourmenu <player>'
```

***

### CheckPoints

This is the configuration of the checkpoints in parkour.

1. Enable or disable checkpoints (enabled: true): This property allows you to enable or disable the checkpoints feature in parkour.
2. **`ParticleEnabled`**(ParticleEnabled: true): This property determines whether particles will be displayed when the user steps on a pressure plate (checkpoint).
3. **`Particle Type`** (Particle: TOTEM): Here you specify the type of particle that will be displayed when a player reaches a checkpoint. In this case, the particle type "TOTEM" is used.
4. **`Messages`**(messages): This property defines the messages that will be displayed to the player when a checkpoint is reached.
5. **`ToggledParticles`**: The list of particles that the player can toggle in the /settings menu.

```yaml
  checkPoint:
    enabled: true
    ParticleEnabled: true
    Particle: TOTEM
    ToggledParticles:
    - TOTEM
    - HEART
    - FIREWORKS_SPARK
    - CLOUD
    - CRIT
    messages:
    - ''
    - '&#fb7f27&lC&#fb8928&lH&#fb9329&lE&#fb9d29&lC&#fba72a&lK&#fbb22b&lP&#fbbc2c&lO&#fbc62c&lI&#fbd02d&lN&#fbda2e&lT&8「&e#%CURRENT%
      &7/ &e%TOTAL%&8」&fyou arrived in&7: &a%parkour_current_course_timer% '
    - ''
```

***

### Join Title & End Title

Within the configuration section you can create titles for when the user joins or finishes a parkour.

1. spiral-ii: This indicates the name of the parkour course to which this setting will apply. Each parkour course can have its own title setting.
2. Values (values: 20;1;3;1): Here you define the delay, fadein, stay, and fadeout values for the title. In this case, the title will be displayed after a delay of 20 time ticks, will have an appearance time of 1 second, will remain visible for 3 seconds and will fade out for 1 second of time.
3. Title: Here you set the text that will be displayed as title when a player joins or finishes the course.
4. Subtitle (subtitle): This is the text that will be displayed as a subtitle next to the title when joining the parkour course.

```yaml
ParkourJoinTitle:
  # Borre o añada el nombre del parkour para habilitar o deshabilitar
  espiral-ii:
    # valores (delay);(fadein);(stay);(fadeout)
    values: 20;1;3;1
    title: "&#E5FBD1ᴘʟᴀʏɪɴɢ"
    subtitle: '&#49fb24ᴘ&#4afb23ᴀ&#4bfb22ʀ&#4cfb21ᴋ&#4dfc1fᴏ&#4efc1eᴜ&#4ffc1dʀ &#50fc1cᴇ&#50fc1bs&#51fc1aᴘ&#52fc19ɪ&#53fc18ʀ&#54fd16ᴀ&#55fd15ʟ &#56fd14ɪ&#57fd13ɪ'
```

### Title on Leave

```yaml
ParkourEndTitles:
  espiral-ii:
    # valores (delay);(fadein);(stay);(fadeout)
    values: 200;1;3;1
    title: '&a&lCOMPLETED'
    subtitle: '&fParkour!'
```

