From 966ecd6d3b29b2c37da366231a4db78aac369a7b Mon Sep 17 00:00:00 2001 From: WillBAnders Date: Mon, 6 Jun 2022 21:22:52 -0400 Subject: [PATCH] Add opener settings to docs and update example crates config --- docs/config/Crates.md | 10 +++++++--- .../resources/assets/cratecrate/config/crates.conf | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/config/Crates.md b/docs/config/Crates.md index 696900b..eb48ce8 100644 --- a/docs/config/Crates.md +++ b/docs/config/Crates.md @@ -1,6 +1,7 @@ # Crates -Crates define everything necessary to open a crate, such as keys and rewards. +Crates define everything necessary to open a crate, such as keys, rewards, and +effects. ```java = { @@ -9,6 +10,7 @@ Crates define everything necessary to open a crate, such as keys and rewards. ... ] + opener = undefined/"gui"/"roulette" effects = { idle = [ @@ -25,12 +27,13 @@ Crates define everything necessary to open a crate, such as keys and rewards. ### Properties | Name | Type | Description | Default | -| --- | --- | --- | -- +| --- | --- | --- | --- | | `name` | Text | The crate name, inherited from Component | This crate's capitalized `id` | | `lore` | List | The crate lore, inherited from Component | An empty list | | `icon` | Item | The crate icon, inherited from Component | A `chest` with the above `name`/`lore` | | | | `keys` | List | The keys for this crate | An empty list | +| `opener` | undefined/`"gui"`/`"roulette"` | The opener for this crate | undefined (none) | | `effects` | Map | The rewards for this crate | Required | @@ -39,7 +42,7 @@ Crates define everything necessary to open a crate, such as keys and rewards.
Example -A crate containing the example key and rewards. +A crate containing the example key, rewards, and some effects. ```java example = { @@ -48,6 +51,7 @@ example = { keys = [ ["example", 1] ] + opener = "gui" effects = { idle = [ ["rainbow-helix"] diff --git a/src/main/resources/assets/cratecrate/config/crates.conf b/src/main/resources/assets/cratecrate/config/crates.conf index f2937c8..747e0dc 100644 --- a/src/main/resources/assets/cratecrate/config/crates.conf +++ b/src/main/resources/assets/cratecrate/config/crates.conf @@ -4,6 +4,15 @@ example = { keys = [ ["example", 1] ] + opener = "gui" + effects = { + idle = [ + ["rainbow-helix"] + ] + give = [ + ["green-creeper"] + ] + } rewards = [ ["command-prizes", 50.0] ["item-prizes", 50.0]