-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
+++ | ||
title = "Trade Mart" | ||
weight = 1 | ||
+++ | ||
|
||
{{% button href="https://github.com/BetterGUI-MC/TradeMart/" style="gray" icon="code" %}}Code{{% /button %}} {{% button href="https://ci.codemc.io/job/BetterGUI-MC/view/Addon/job/TradeMart/" style="green" icon="download" %}}Download{{% /button %}} | ||
|
||
## Description | ||
|
||
This is an addon to add Villager-like GUI for item trading. | ||
|
||
## Format | ||
|
||
```yaml | ||
menu-settings: | ||
menu-type: trade | ||
|
||
# The actions when the player opens the menu | ||
open-action: | ||
- action | ||
- action | ||
- action | ||
... | ||
|
||
# The actions when the player closes the menu | ||
close-action: | ||
- action | ||
- action | ||
- action | ||
... | ||
|
||
# The requirement before the player can open the menu | ||
view-requirement: | ||
<requirement-set> | ||
<requirement-set> | ||
<requirement-set> | ||
... | ||
|
||
# The requirement before the player can close the menu | ||
close-requirement: | ||
<requirement-set> | ||
<requirement-set> | ||
<requirement-set> | ||
... | ||
|
||
# The permission required to open the menu | ||
permission: bettergui.test | ||
|
||
# The command to open the menu | ||
command: | ||
- command1 | ||
- command2 | ||
... | ||
|
||
# The title of the inventory | ||
title: <name> | ||
#name: <name> | ||
|
||
# The list of argument processors to process the arguments of the command to open the menu | ||
argument-processor: | ||
- <argument-processor> | ||
- <argument-processor> | ||
|
||
trade-name1: | ||
item1: | ||
<button-settings> | ||
item2: | ||
<button-settings> | ||
result: | ||
<button-settings> | ||
|
||
trade-name2: | ||
item1: | ||
<button-settings> | ||
item2: | ||
<button-settings> | ||
result: | ||
<button-settings> | ||
... | ||
``` | ||
|
||
## Note | ||
|
||
* `open-action`: the [Action]({{% ref "action/overview" %}}) when the menu is opened. | ||
* `close-action`: the [Action]({{% ref "action/overview" %}}) when the menu is closed. | ||
* `view-requirement`: the [Requirement]({{% ref "requirement/overview" %}}) to check before opening the menu. If it is not met, the menu will not be opened. | ||
* `close-requirement`: the [Requirement]({{% ref "requirement/overview" %}}) to check before closing the menu. If it is not met, the menu will not be closed. | ||
* `argument-processor`: the [Argument Processor]({{% ref "argument" %}}) to handle the arguments of the command to open the menu. | ||
|
||
## Trade | ||
|
||
```yaml | ||
trade-name: | ||
item1: | ||
<button-settings> | ||
item2: | ||
<button-settings> | ||
result: | ||
<button-settings> | ||
max-uses: <number> | ||
``` | ||
* `item1`: The first item to trade. REQUIRED | ||
* `item2`: The second item to trade. OPTIONAL | ||
* `result`: The result item. REQUIRED | ||
* `max-uses`: The maximum uses of a trade. OPTIONAL | ||
|
||
## Example | ||
|
||
```yaml | ||
menu-settings: | ||
menu-type: trade | ||
title: "&c&lTest Trade" | ||
command: trade | ||
trade1: | ||
item: | ||
id: diamond | ||
item2: | ||
id: redstone | ||
result: | ||
id: piston | ||
trade2: | ||
item: | ||
id: diamond_block | ||
amount: 64 | ||
result: | ||
id: paper | ||
name: "&b&lRich Cerificate" | ||
trade3: | ||
item: | ||
id: paper | ||
name: "&b&lRich Cerificate" | ||
item2: | ||
id: emerald | ||
amount: 64 | ||
result: | ||
id: paper | ||
name: "&a&lVillage Cerificate" | ||
lore: | ||
- "" | ||
- "&7Signed by {player}" | ||
``` |