diff --git a/docs/boosters/how-to-make-a-custom-booster.md b/docs/boosters/how-to-make-a-custom-booster.md index 9fcbfad2d3..96b687b778 100644 --- a/docs/boosters/how-to-make-a-custom-booster.md +++ b/docs/boosters/how-to-make-a-custom-booster.md @@ -96,7 +96,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ---------------------------------------- | diff --git a/docs/ecoarmor/how-to-make-a-custom-set.md b/docs/ecoarmor/how-to-make-a-custom-set.md index 9eb287feed..67ff4b34af 100644 --- a/docs/ecoarmor/how-to-make-a-custom-set.md +++ b/docs/ecoarmor/how-to-make-a-custom-set.md @@ -437,4 +437,10 @@ The effects section is the core functionality of the Armor Set. You can configur Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring-an-effect) to understand how to configure this section correctly. -For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. \ No newline at end of file +For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. + +## Internal Placeholders + +| Placeholder | Value | +| ----------- | -------------------------- | +| `%tier%` | The tier of the armor set. | diff --git a/docs/ecoenchants/how-to-make-a-custom-enchant.md b/docs/ecoenchants/how-to-make-a-custom-enchant.md index e982dc1277..44e7548907 100644 --- a/docs/ecoenchants/how-to-make-a-custom-enchant.md +++ b/docs/ecoenchants/how-to-make-a-custom-enchant.md @@ -81,7 +81,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ----------------------------------------------------------------------------------------------------------------------- | diff --git a/docs/ecojobs/how-to-make-a-custom-job.md b/docs/ecojobs/how-to-make-a-custom-job.md index ca8644c6b6..2078e0a9de 100644 --- a/docs/ecojobs/how-to-make-a-custom-job.md +++ b/docs/ecojobs/how-to-make-a-custom-job.md @@ -174,7 +174,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ----------------------------------------------------------- | diff --git a/docs/ecopets/how-to-make-a-custom-pet.md b/docs/ecopets/how-to-make-a-custom-pet.md index 169e006199..27020b369a 100644 --- a/docs/ecopets/how-to-make-a-custom-pet.md +++ b/docs/ecopets/how-to-make-a-custom-pet.md @@ -150,11 +150,17 @@ xp-requirements: ### Spawn Egg **enabled:** If the skill should show in /pets. + **icon:** The item to show in /pets, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system). + **name:** The name of the spawn egg in-game. + **lore:** The lore to show in /pets when hovering the icon. + **craftable:** If the item should be craftable (true/false). -**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes) + +**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes). + **recipe-permission:** (Optional) The permission required to craft the recipe. ### Effects & Conditions @@ -165,7 +171,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ----------------------------------------------------------- | diff --git a/docs/ecoquests/how-to-make-a-quest.md b/docs/ecoquests/how-to-make-a-quest.md index 376ddc7ca2..61b50dc22e 100644 --- a/docs/ecoquests/how-to-make-a-quest.md +++ b/docs/ecoquests/how-to-make-a-quest.md @@ -108,7 +108,7 @@ tasks: **item:** The item to show in /quests, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system) -### Effects +### Effects & Conditions The quest rewards uses the effects system. You can configure effects, conditions, filters, and mutators in this section to run when the quest is started or as rewards. diff --git a/docs/ecoquests/how-to-make-a-task.md b/docs/ecoquests/how-to-make-a-task.md index bcf909a727..a3cb66f8b7 100644 --- a/docs/ecoquests/how-to-make-a-task.md +++ b/docs/ecoquests/how-to-make-a-task.md @@ -46,7 +46,7 @@ on-complete: **on-complete:** Effects to be run when the task is completed (Supports triggered effects). See [Configuring an Effect](https://plugins.auxilor.io/effects/configuring-an-effect) -### Effects +### Effects & Conditions The task rewards uses the effects system. You can configure effects, conditions, filters, and mutators in this section to run when the quest is started or as rewards. @@ -54,7 +54,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | --------------- | ---------------------------------------------- | diff --git a/docs/ecoshop/ecoshop-effects/filters/shop_item.md b/docs/ecoshop/ecoshop-effects/filters/shop_item.md new file mode 100644 index 0000000000..1ca05ec984 --- /dev/null +++ b/docs/ecoshop/ecoshop-effects/filters/shop_item.md @@ -0,0 +1,13 @@ +# `shop_item` + +Require a certain shop item + +**Requires EcoShop** + +# Example Config +```yaml +filters: + shop_item: + - iron_rank + - gold_rank +``` diff --git a/docs/ecoshop/ecoshop-effects/triggers/triggers.md b/docs/ecoshop/ecoshop-effects/triggers/triggers.md new file mode 100644 index 0000000000..1b156f7687 --- /dev/null +++ b/docs/ecoshop/ecoshop-effects/triggers/triggers.md @@ -0,0 +1,6 @@ +# EcoShop Triggers + +| ID | Description | Value Provided | +| ----------- | ------------------------------------------------------------- | -------------- | +| `buy_item` | Triggered when buying an item in a shop **Requires EcoShop** | The price | +| `sell_item` | Triggered when selling an item in a shop **Requires EcoShop** | The price | diff --git a/docs/ecoshop/how-to-make-a-category.md b/docs/ecoshop/how-to-make-a-category.md index 5aa8169fc5..9c4cc185ed 100644 --- a/docs/ecoshop/how-to-make-a-category.md +++ b/docs/ecoshop/how-to-make-a-category.md @@ -3,28 +3,108 @@ title: "How to make a category" sidebar_position: 3 --- -## What's a category? +## Categories -Categories are how shops are organized. Items are sold / bought in categories, they're -the actual 'shop' part. In the example config, you will have seen how shops can either -be a portal to a bunch of categories, or alternatively just directly link to a category. +Categories are how shops are organised. Items are sold / bought in categories, they're the actual 'shop' part. In the [[how-to-make-a-shop|How to make a Shop]] section, you will have seen how shops can either be a portal to a bunch of categories, or alternatively just directly link to a category. ## Default config +The default configs can be found [here](https://github.com/Auxilor/EcoShop/blob/main/eco-core/core-plugin/src/main/resources/categories). -The default configs can be found here: +## How to add shops +Each category is its own config file, placed in the `/categories/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out! -[GitHub](https://github.com/Auxilor/EcoShop/blob/master/eco-core/core-plugin/src/main/resources/categories/) +The ID of the category is the file name. This is what you use in commands, effects and placeholders. +ID's must be lowercase letters, numbers, and underscores only. -## How to add categories +One category can be in as many shops as you want! EcoShop is smart, it knows what shop you opened the category from, so any sounds / broadcasts from the shop you came from will work even if 2 shops share the same category. -This works just the same as adding or removing shops. Just make or remove .yml files in -the `/categories/` directory, and then reference them in the shop you want them to be in. +## Example Category Config -One category can be in as many shops as you want! EcoShop is smart, it knows what shop -you opened the category from, so any sounds / broadcasts from the shop you came from -will work even if 2 shops share the same category. +```yaml +item: diamond_sword name:"&fExample Category" # The item shown in the shop. +lore: [ ] # The lore of the item shown in the shop. +# permission: ecoshop.category.permission1 # (Optional) The permission required to access/use the category. -## Example Category Config +# Options for the category GUI. +gui: + rows: 6 # The amount of rows to have (1-6). + title: "Demo Category" # The title of the GUI. + + # Navigation options, hidden if on the first/last page. + forwards-arrow: + item: arrow name:"&fNext Page" + row: 6 + column: 6 + backwards-arrow: + item: arrow name:"&fPrevious Page" + row: 6 + column: 4 + + # Add as many pages as you want by appending to this list + pages: + - page: 1 + mask: + items: # The background material + - gray_stained_glass_pane + - black_stained_glass_pane + pattern: # 0 for empty, 1 for the first item, 2 for the second item, etc + - "222222222" + - "211111112" + - "211111112" + - "211111112" + - "211111112" + - "222222222" + + # Custom GUI slots; see here for a how-to: https://plugins.auxilor.io/all-plugins/custom-gui-slots + custom-slots: [ ] + +items: + - id: iron_rank + commands: # The commands to execute. You can use %player% and %amount% as placeholders.q + - lp user %player% parent set iron + buy: + value: "%ecomc_iron_price%" + type: crystals + display: "&b%value% Crystals ❖" + limit: 1 # (Optional) The max amount of times each player can buy this item, defaults to infinite. + gui: + display: # This item is shown in the GUI. If you're selling an item, this defaults to the item itself. + item: diamond_chestplate + lore: + - "&fBuy &7&lIRON&r&f rank to get" + - "&fthe following benefits:" + - " &8»&f &eExample Perk" + column: 5 # The column. + row: 3 # The row. + page: 2 # The page. +``` + +## Understanding all the sections + +### Basic Options + +**item:** The item that is displayed in your shop GUI, read here for more info: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system). Use `name:` to set a custom name for the category. + +**lore:** The lore/description to be shown in your shop GUI. + +**permission:** (Optional) The permission required to open this category. + +### GUI + +**rows:** The amount of rows the category GUI will have (1-6). + +**title:** The name shown at the top of the GUI. + +**forwards/backwards-arrow:** The item and location of the navigation arrows. + +##### Pages + +To configure a pattern and mask, read here for more info: + +**custom-slots:** Any non-shop items for the GUI (eg. info items), read here for more info: [[custom-gui-slots|Custom GUI Slots]]. + +### Items + +This section is where you put any items that you are buying and/or selling in this category. -EcoShop comes with an example category config that explains everything, -[read it here](https://github.com/Auxilor/EcoShop/blob/main/eco-core/core-plugin/src/main/resources/categories/_example.yml) +Read here for more info on creating your shop items: [[how-to-make-an-item|How to make an Item]]. \ No newline at end of file diff --git a/docs/ecoshop/how-to-make-a-shop.md b/docs/ecoshop/how-to-make-a-shop.md index 264d6d3ec3..76737c0207 100644 --- a/docs/ecoshop/how-to-make-a-shop.md +++ b/docs/ecoshop/how-to-make-a-shop.md @@ -2,20 +2,132 @@ title: "How to make a shop" sidebar_position: 2 --- +## Shops +Creating shops is easy if you follow the the basic rules: A shop requires [[how-to-make-a-category|categories]], and categories require [[how-to-make-an-item|items]]. ## Default config - -The default configs can be found here: - -[GitHub](https://github.com/Auxilor/EcoShop/blob/master/eco-core/core-plugin/src/main/resources/shops/) +The default configs can be found [here](https://github.com/Auxilor/EcoShop/blob/main/eco-core/core-plugin/src/main/resources/shops). ## How to add shops +Each shop is its own config file, placed in the `/shops/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out! -EcoShop lets you make as many shops as you want, and you make each one by making a new -.yml file in the `/shops/` directory. Simply add and remove configs as you want to add and -remove shops. +The ID of the shop is the file name. This is what you use in commands, effects and placeholders. +ID's must be lowercase letters, numbers, and underscores only. ## Example Shop Config -EcoShop comes with an example shop config that explains everything, -[read it here](https://github.com/Auxilor/EcoShop/blob/main/eco-core/core-plugin/src/main/resources/shops/_example.yml) \ No newline at end of file +```yaml +title: Demo Shop # The GUI title. +command: demoshop # The command to open the shop. + +forwards-arrow: # The arrow for switching between pages. If on the last page, this will not show up. + item: arrow name:"&fNext Page" + row: 6 + column: 6 + +backwards-arrow: # The arrow for switching between pages. If on the first page, this will not show up. + item: arrow name:"&fPrevious Page" + row: 6 + column: 4 + +buy-broadcasts: # Options for buy broadcasts + enabled: true # If purchases in this shop should be broadcast to the server, good for /buy menus. + message: "&b&lCrystal Shop&r &8»&r %player%&r&f has bought &r%item%&r&ffrom the &bCrystal Shop ❖&f!" # Use %player%, %item%, and %amount% + sound: # Broadcast sound, remove this section if you don't want a sound. + sound: ui_toast_challenge_complete + pitch: 1.5 + volume: 2 + +click-sound: # A sound to be played when clicking an icon in this shop, remove this section if you don't want a sound. + sound: block_stone_button_click_on # The sound https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html + pitch: 1 # The pitch (0.5 - 2) + volume: 1 + +buy-sound: # A sound to be played when buying something in this shop, remove this section if you don't want a sound. + sound: entity_player_levelup + pitch: 2 + volume: 1 + +sell-sound: # A sound to be played when selling something in this shop, remove this section if you don't want a sound. + sound: block_amethyst_block_place + pitch: 1.5 + volume: 1 + +# Shops can work in two ways. + +# You can either have a shop contain a list of categories, or you can make a shop be one +# category that you're instantly sent to (for single page shops, e.g. a boss spawn egg shop) + +# If you want a single-page shop, use direct-category to link it straight to a category +# direct-category: example_category + +# If you want a regular shop that contains multiple categories, use these options here +rows: 3 +pages: # All the pages in the preview GUI. You can add as many pages as you want. + - page: 1 + mask: # Filler items for decoration + items: # Add as many items as you want + - gray_stained_glass_pane # Item 1 + - black_stained_glass_pane # Item 2 + pattern: + - "222222222" + - "211111112" + - "211000112" + - "211000112" + - "211111112" + - "222222222" + categories: # Where to put categories in the GUI + - id: example # The category ID + row: 3 # The row + column: 3 # The column + - id: example_2 + row: 4 + column: 6 + + # Custom GUI slots; see here for a how-to: https://plugins.auxilor.io/all-plugins/custom-gui-slots + custom-slots: [ ] +``` + +## Understanding all the sections + +**title:** The name shown at the top of the GUI. + +**forwards/backwards-arrow:** The item and location of the navigation arrows. + +#### Buy Broadcasts + +**enabled:** If a broadcast should be sent when a player buys from this shop. + +**message:** The broadcast message to be sent + +**sound:** (Optional) The sound to play when an item is bought. + +#### Sounds (Optional) + +**click-sound:** The sound to play when buttons in this shop are pressed. + +**buy-sound:** The sound to play when an item is bought from this shop. + +**sell-sound:** The sound to play when an item is sold from this shop. + +*You can find all the sounds here: [Sounds](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html)* + +### Configuring Categories + +There are two methods to add [[how-to-make-a-category|categories]], first is a direct and second is a list. + +#### Direct Category + +**direct-category:** The ID of the category, this will open the category directly instead of the shop GUI - for single page shops. + +#### List of Categories + +**rows:** How many rows are in the shop GUI. +##### Pages + +To configure a pattern and mask, read here for more info: +##### Categories + +**id:** The ID of the category (eg. `example.yml` has an ID of `example`) + +**row/column:** The location of this category in the shop \ No newline at end of file diff --git a/docs/ecoshop/how-to-make-an-item.md b/docs/ecoshop/how-to-make-an-item.md index 2ffb4c412d..b46775c39d 100644 --- a/docs/ecoshop/how-to-make-an-item.md +++ b/docs/ecoshop/how-to-make-an-item.md @@ -3,156 +3,118 @@ title: "How to make an item" sidebar_position: 4 --- -## What are items? +## Items +Items are everything that can be bought or sold in the shop. They can be real items or commands, single-purchase, limited purchase, buy only, sell only, both, they can be bought with 2 different currency types - the point is, there's a lot of options to wrap your head around. -Items are everything that can be bought or sold in the shop. They can be real items or -commands, single-purchase, limited purchase, buy only, sell only, both, they can be bought -with 2 different currency types - the point is, there's a lot of options to wrap your head around. - -## How do I make one? +These items go into your category config, read here for more into: [[how-to-make-a-category|How to make a Category]] +## How to add items ### Simple buy-sell item -Let's start with a really simple shop item - if you're making a standard buy-sell shop, this -is what most of your items will look like: +Let's start with a really simple shop item - if you're making a standard buy-sell shop, this is what most of your items will look like: ```yaml id: cooked_mutton item: cooked_mutton - buy: type: coins value: 20 display: $%value% amount: 32 - sell: type: coins value: 10 display: $%value% - gui: column: 4 row: 1 page: 1 ``` -Let's break down each section: +#### Understanding all the sections `id`: This is the internal ID of the item. Players don't see this, but it's important -to use a unique ID for every item in all of your shops. +to use a unique ID for every item in all of your shops. This is used in commands, placeholders and referencing the item -`item`: This is the actual item we're selling. It supports custom items, enchantments, -custom names, amounts, reforges, etc. - read -more [here](https://plugins.auxilor.io/all-plugins/the-item-lookup-system) +`item`: This is the actual item we're selling, read here for more info: [[the-item-lookup-system|Item Lookup System]]. +##### Buy (Optional) -`buy`: If you want to make your item purchasable, this is where you specify the buy price. -Read more about prices [here](https://plugins.auxilor.io/all-plugins/prices), they're important -to understand when making items. +**type/value/display:** This is standard configuration of prices, read here for more info: [[prices|Price]]. Prices are configured per-item. -`buy.amount`: This is an optional feature where you specify the default amount of items -to buy with quick-buy, and the default amount of items when opening the buy amount selection -menu. You still specify the value of only one item - this is just to give a default purchase -quantity. +**amount:** (Optional) The amount of items to be bought at once. Defaults to 1. +##### Sell -`sell`: This works the same as buy, except now it's the sell price. +**type/value/display:** This is standard configuration of prices, read here for more info: [[prices|Price]]. Prices are configured per-item. +##### GUI -`gui`: These are options for how the item will show in the category. Row is top to bottom, -column is left to right, and pages are self-explanatory. +**row/column/page:** The location of this item in the shop ### Command Items -Sometimes you want to run a command when a player buys an item rather than (or as well as) -giving the player a real item. It's really common now in servers to have multiple currency -setups and move things like ranks to be done from in-game shops, so let's see how you can -do that with EcoShop. +Sometimes you want to run a command when a player buys an item, such as giving permissions/ranks/items from other plugins not currently supported in [[the-item-lookup-system|Item Lookup System]]. Of course, you can't sell a command, so they're buy-only. ```yaml id: iron_rank - -command: # I Changed the commands: to command: because it doesn't work with an "s" +command: - lp user %player% parent set iron - buy: value: "%ecomc_iron_price%" type: crystals display: "&b%value% Crystals ❖" - - require: "%actions_iron_buy_is_met%" - limit: 1 - -alt-buy: - value: "%ecomc_iron_crystal_price%" - type: crystals - display: "&b%value% Crystals ❖" - - conditions: [ ] - gui: display: - item: diamond_chestplate + item: diamond_chestplate name:"&aIron Rank" lore: - "&fBuy &7&lIRON&r&f rank to get" - "&fthe following benefits:" - " &8»&f &eExample Perk" - bottom-lore: + bottom-lore: # You can also add lore to be put under other lore (e.g. price, quick buy/sell info, etc.) + - "" - "&e&oLeft click to buy with money," - "&e&oRight click to buy with &bCrystals ❖&e&o!" column: 5 # The column. row: 3 # The row. page: 2 # The page. - - show-quick-buy-sell: false ``` -`commands`: These are the commands to run when the player buys the item. You can use `%player%` and -`%amount%` as placeholders. +#### Understanding all the sections + +`id`: This is the internal ID of the item. Players don't see this, but it's important +to use a unique ID for every item in all of your shops. This is used in commands, placeholders and referencing the item -`buy.value`: You can use placeholders in values! Any PlaceholderAPI placeholder is allowed. And it -gets a lot better than that - you can do **math** with this too. For example, `%player_y% * 100 - cos(%player_x%)` -would be totally allowed too. That's obviously a pretty weird price, but it's possible. +`command`: This is the command to be run when a player buys this item. You can use `%player%` and `%amount%` as placeholders. +##### Buy -`buy.require`: This is a mathematical expression that has to be met in order to be allowed to -buy this item. For example, you could do `%player_xp% >= 300` +**type/value/display:** This is standard configuration of prices, read here for more info: [[prices|Price]]. Prices are configured per-item. -`buy.conditions`: Conditions that have to be met in order to buy this item, read -[here](https://plugins.auxilor.io/effects/configuring-a-condition) for more information! +**limit:** (Optional) The max amount of times a player can buy this item. +##### GUI -`buy.limit`: The maximum amount of times a player can buy this item. +**display.item:** This is the item shown in the GUI, read here for more info: [[the-item-lookup-system|Item Lookup System]]. -`alt-buy`: This is a secondary buying option that you can right-click the item to use. Let's say -you have a dual currency system, you can make left-click cost money and right-click cost crystals, -or you can make left-click cost gold ingots and right-click cost emeralds. +**display.lore:** This is the lore shown on the item. -`gui.display`: This is the item that's shown to players in the shop. Commands don't have any -item to automatically show, so you have to specify one. You can also specify a custom display item -if you're selling items, but it's not necessary. You can optionally specify lore and bottom lore too, -where bottom lore is shown under things like the buy price, quick buy options, etc. +**display.bottom-lore:** Lore shown under other lore, such as displaying prices. -`gui.show-quick-buy-sell`: By default, quick buy / quick sell lore is shown on items. If you don't -want that for this item, you can disable it here. +**row/column/page:** The location of this item in the shop ### Effect Items Instead of just using commands, EcoShop also has full access to the -[effects system](https://plugins.auxilor.io/effects/configuring-an-effect), so you can run -effects when a player buys an item, or even just put effects themselves in the shop. +[effects system](https://plugins.auxilor.io/effects/configuring-an-effect), so you can run effects when a player buys an item, or even just put effects themselves in the shop. Like commands, these are unsellable. ```yaml id: my_effect_item - effects: [ ] - buy: value: 65 type: crystals display: "&b%value% Crystals ❖" - gui: display: item: nether_star @@ -161,14 +123,164 @@ gui: column: 6 # The column. row: 3 # The row. page: 2 # The page. - show-quick-buy-sell: false ``` -`effects`: These are the effects that are ran when the player buys the item. Read -[here](https://plugins.auxilor.io/effects/configuring-an-effect) to learn more! +#### Understanding all the sections + +`id`: This is the internal ID of the item. Players don't see this, but it's important +to use a unique ID for every item in all of your shops. This is used in commands, placeholders and referencing the item + +`effects`: These are the effects that are ran when the player buys the item. Read here for more info: [[configuring-an-effect|Configuring an Effect]]. **Only Triggered Effects**. +##### Buy + +**type/value/display:** This is standard configuration of prices, read here for more info: [[prices|Price]]. Prices are configured per-item. + +**limit:** (Optional) The max amount of times a player can buy this item. +##### GUI + +**display.item:** This is the item shown in the GUI, read here for more info: [[the-item-lookup-system|Item Lookup System]]. + +**row/column/page:** The location of this item in the shop + +## Alt-Buy + +EcoShop supports buying items with multiple currencies using the `alt-buy` options. All the options that work with `buy` also apply to `alt-buy`. These are configured the same way, using the [[prices|price]] system. + +```yaml + alt-buy: + value: 65 + type: crystals + display: "&b%value%❖" +``` + +## Optional Arguments + +### Buy + +#### `require` + +A mathematical expression that must be met to buy this item. + +```yaml +buy: + require: "%player_xp% >= 300" +``` + +#### `conditions` + +Any conditions that must be met to buy the item. Read here for more info: [[configuring-a-condition|Configuring a Condition]]. + +```yaml +buy: + conditions: + - id: has_permission + args: + permission: group.iron +``` + +#### `limit` + +The max times a player can buy this item. + +```yaml +buy: + limit: 1 +``` + +#### `global-limit` + +The max times all players can buy this item. + +```yaml +buy: + global-limit: 1 +``` + +#### `max-at-once` + +The max amount of this item a player can buy at once. (Removes the multi-buy GUI). + +```yaml +buy: + max-at-once: 1 +``` + +#### `amount` + +The amount of items to be bought at once. + +```yaml +buy: + amount: 32 +``` + +#### `buy-message` + +A message to be sent to the player when this item is bought. + +```yaml +buy: +. buy-message: + - "&6Thanks for buying this specific item" +``` + +### Sell + +#### `require` + +A mathematical expression that must be met to buy this item. + +```yaml +buy: + require: "%player_xp% >= 300" +``` +#### `conditions` + +Any conditions that must be met to sell the item. Read here for more info: [[configuring-a-condition|Configuring a Condition]]. + +```yaml +sell: + conditions: + - id: has_permission + args: + permission: group.iron +``` + +#### `sell-message` + +A message to be sent to the player when this item is sold. + +```yaml +sell: +. sell-message: + - "&6Thanks for buying this specific item" +``` + +#### `sell-command` + +Commands to be run when the player sells this item. + +```yaml +sell: +. sell-command: + - "lp user parent set top.seller" +``` + +### GUI +#### `show-quick-buy-sell` + +By default, quick buy/sell lore is shown, disable it using `show-quick-buy-sell` + +```yaml +sell: +. show-quick-buy-sell: false +``` -### Extra Options +## Internal Placeholders -There's some extra options that aren't shown in the above examples. If you want to explore all -the possible options, they're showcased in the [example category](https://github.com/Auxilor/EcoShop/blob/main/eco-core/core-plugin/src/main/resources/categories/_example.yml) +| Placeholder | Value | +| ---------------- | ----------------------------------------------------------- | +| `%amount%` | The amount of items the player bought | +| `%value%` | The buy/sell value, to use in price display | +| `%value_commas%` | The comma separated buy/sell value, to use in price display | diff --git a/docs/ecoskills/how-to-make-a-skill.md b/docs/ecoskills/how-to-make-a-skill.md index b76e667815..d90a4f3e8b 100644 --- a/docs/ecoskills/how-to-make-a-skill.md +++ b/docs/ecoskills/how-to-make-a-skill.md @@ -245,7 +245,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ------------------------------------------------------------- | diff --git a/docs/ecoskills/how-to-make-a-stat.md b/docs/ecoskills/how-to-make-a-stat.md index 396b1b9009..d30f9aaf68 100644 --- a/docs/ecoskills/how-to-make-a-stat.md +++ b/docs/ecoskills/how-to-make-a-stat.md @@ -79,7 +79,7 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info. -### Internal Placeholders +## Internal Placeholders | Placeholder | Value | | ----------- | ------------------------------------------------------------ |