# Options

## Season duration

Range of days, while module is active.

```yaml
Options:
  Season:
    StartDateTime: "01.12.2023 00:00" #The datetime when the season starts.
    EndDateTime: "24.12.2023 23:59" #The datetime when the season ends.
```

{% hint style="warning" %}
Before and after this season, players won't be able to interact with Figure.
{% endhint %}

### Window

Window at Calendar opens once a day at specified time.

```yaml
Options:
  Season:
    Window:
      OpeningTime: "00:00"
```

If player misses to claim the window for specific day, he won't able to open in next day!

This **strict** behaviour can be changed to **benevolent** and player is able to open any previous windows.

```yaml
Options:
  Season:
    Window:
      ClaimingType: "STRICT" #STRICT or BENEVOLENT
```

## Sound

Sounds make the game more attractive. Currently played at various situations while interacting with figure.

#### Actions, when the Sounds are played.

* **OpeningWindow** - Sound played when the new window has been opened.
* **ClaimingReward** - Sound played to player at claiming reward.
* **Spin Button** - Sound played at LuckyWheel at interacting with Spin button.
* **Spin Animation** - Sound played at LuckyWheel at spinning with rewards.
* **Closing Animation** - Sound played at LuckyWheel at closing spining field.

List of latest sounds are available at <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html>

```yaml
Options:
  Sound: #Sounds valid for 1.12.X.
    Window:
      Open: "UI_TOAST_CHALLENGE_COMPLETE"
      Claim: "ENTITY_FIREWORK_TWINKLE"
    LuckyWheel:
      Spin:
        Button: "UI_BUTTON_CLICK"
        Animation: "ITEM_FLINTANDSTEEL_USE"
      Closing:
        Animation: "ENTITY_CHICKEN_STEP"
```

## Reward

Choice Types:

* `QUICK_ALL` - All assigned rewards are given to player
* `QUICK_CHANCE` - One reward is selected from assigned list by probability
* `LUCKY_WHEEL` - After click, new GUI will be opened. There, **random** reward from list selected for that day will be claimed. It is the same option as `QUICK_CHANCE`, but here is an animation

Example for **probability**. `DiamondTools` has 90% chance, `MoneyPocket` has 10% chance to win.&#x20;

{% hint style="danger" %}
Summary of probability at assinged rewards has to be **100.0**! Otherwise, system won't work correctly!
{% endhint %}

```yaml
Options:
  Reward:
    DefaultChoiceType: QUICK_ALL
```

#### Benefit

By opening all windows in calendar, you can reward players with **extra** gift.

```yaml
Options:
  Reward:
    Benefit:
      Active: false
```

## PlayTime Restriction

To prevent abuse from fake accounts opening windows or to enhance the gameplay experience, you can require players to spend a specified amount of time on your server before being able to open a window.

{% hint style="warning" %}
These settings are applied on each window! If you want to have different settings per-window, please check [Calendar section](https://wiki.innouniq.com/plugins/advent-season/modules/advent-calendar/calendar#playtime-restriction).
{% endhint %}

Types of Restriction:

* `Total` - Total time spent on the server.
  * Example: Player has to play for at least 5 Days(7200 Minutes) to be able to open a window.
* `Today` - Today's time spent on the server. Probably most used
  * Example: Player has to play for at least 30 Minutes **that day** to be able to open a window.
* `Session` -  Time spent on the server since player logged in.
  * Example: Player has to be **online** for at least 30 Minutes to be able to open a window.

<pre class="language-yaml"><code class="lang-yaml"><strong>Options:
</strong>  DefaultPlayTime:
    TotalMinute: 0
    TodayMinute: 0
    SessionMinute: 0
</code></pre>

{% hint style="warning" %}
To disable PlayTime Restriction, keep all values to `0`.
{% endhint %}

## Visual

Section represents components displayed at chat, boss bars and titles.

### Boss Bar

Players are able to see current information about upcoming event.

```yaml
Options:
  Visual:
    BossBar:
      Active: true
      Color: "PURPLE"
      Style: "SEGMENTED_20"
```

#### Available colors

`PINK`, `BLUE`, `RED`, `GREEN`, `YELLOW`, `PURPLE`, `WHITE`

#### Available styles

`SOLID`, `SEGMENTED_6`, `SEGMENTED_10`, `SEGMENTED_12`, `SEGMENTED_20`

### Information intervals

Information can be displayed in specified **intervals** and these itervals are mainly associtated with **BossBar**.

Imagine interval in math, but reversed because of countdown which is decresing.

\
If we want to display BossBar since **30** seconds to **10** seconds, we use interval `30:11`(`FROM:TO+1`). Plus **1** because of we want to hide BossBar in 10 seconds. (If we keep 10 seconds in the interval, BossBar will be hidden in 9 seconds.)

```yaml
Options:
  Visual:
    Info:
      Active: true
      Interval:
       - "60:56"
       - "10:1"
```

## Restriction

You can disable performing some actions while using the resource.

Operate with modules such as AdventCalendar or ChristmasMail can be restricted in specified worlds. Each world name on the new line.

```yaml
Options:
  Restriction:
    World:
      - world_the_end
      - world_nether
      - SomeAnotherRestrictedWrold
```

If you want to allow all worlds, you need to set **Empty Collections(`[]`)** here!

```yaml
Options:
  Restriction:
    World: []
```

## Figure (Santa)

Via **Figure**, players are able to open Advent Calendar. Santa also displays current status of the season.

System offers pre-defined **Armor Stand**, with clothes and head. All values can be changed in the configuration file. System also supports **NPC**, you can aslo equip it with armor or items.

{% hint style="warning" %}
Warning at placing the Figure. Figure copies your locations and also facing direction!
{% endhint %}

{% hint style="info" %}
To place Assistant type: `/AdventCalendar Figure Place`
{% endhint %}

If you have own Armor Stand, you can link it with Advent Figure. It only creates Holograms above the Armor Stand.

{% hint style="info" %}
To link Figure with the nearest Armor Stand in your range type: `/AdventCalendar Figure Link`
{% endhint %}

### Mode

List of modes mentioned above:

* NONE
* ARMOR\_STAND
* PLAYER
* HOLOGRAM

```yaml
Options:
  Figure:
    Mode: "ARMOR_STAND"
```

### Particle

Particles are spawning around the spawned Figure. You can keep them active or disable them. Also you can change Effect, Color, Speed and Amount.

```yaml
Options:
  Figure:
    Particle:
      Active: true
      TickDelay: 13 #How fast particles are spawned. (20 ticks = 1 second)
      Data:
        Effect: SPELL_WITCH
        Amount: 35
        Speed: 1.0 #Optional, Default 1.0
        Color: "255:255:255" #Optional, Default White
        Offest: #Optional, Offset from Figures's location. (Vector)
          X: .5
          Y: .5
          Z: .5
```

## Calendar Interface (GUI)

Calendar interface is the main part of the whole module, that's the reason it must looks perfect. And you can configure it to your requirements.

### Slot

Slots are configured at Calendar.yml file.

### Order

Specify the order of the day assigned to slot of the window.

* `RANDOM` - Days are assigned to window in random order. Shuffle order is created after loading of the plugin.
* `STATIC` - Days are assigned to window in order specified in Calendar.yml file.

```yaml
Options:
  GUI:
    Base:
      AdventCalendarGUI:
        Window:
          OrderType: "RANDOM"
```

### Window's Icon

Claimed window has another visual icon as closed or missed window.

* `REWARD` - Icon of reward is used as opened window.
* `DEFAULT` - Item from configuration is used as opened window.

```yaml
Options:
  GUI:
    Base:
      AdventCalendarGUI:
        Window:
          ClaimedIconType: "REWARD"
```
