# 🎉Welcome

## Links

### Get the plugin

* **SpigotMC:** [FREE](https://www.spigotmc.org/resources/mythictotem-custom-boss-spawn-totem-and-bonus-totem-all-in-1-1-20-5.102466/) | [PREMIUM](https://www.spigotmc.org/resources/mythictotem-premium-custom-boss-spawn-totem-and-bonus-totem-all-in-1-1-20-5.111650/) (will post each update)
* **Polymart:** [FREE](https://voxel.shop/product/2158/mythictotem) | [PREMIUM](https://voxel.shop/product/3598/mythictotem-premium) (will post each update)
* **BuiltByBit:** [PREMIUM](https://builtbybit.com/resources/mythictotem.27795/) (will post each update)
* **Modrinth:** [FREE](https://modrinth.com/plugin/mythictotem) (weekly update, maybe not latest version)

### Get support <a href="#get-support" id="get-support"></a>

* All users have an obligation to comply with our rules after joining the Discord server, which can be viewed in the rules channel. If you do not agree with our rules, you will not be able to receive our service support. Users who violate the rules will be punished according to the situation, including permanent ban.
* Every user is obligated to comply with our plugin terms of use. You can find these in the **LICENSE** file within the JAR file. We do not provide any assistance to users who fail to comply with the terms of use.
* Compared to users who have purchased the paid version, our service support priority for free users will be lower, with more requirements and restrictions. I have invested a lot of time and effort in developing plugins, but despite this, I have provided a free version and the complete plugin source code. I have not closed the source or restricted the number of user IP addresses used. Therefore, better service support is not free, and you should not ask me to provide good service for free. If you want your issue to be taken seriously, please consider purchasing a paid version to support plugin development.
* Support is only available at our [Discord](https://discord.gg/rzajeybhbw) server.
* 因 Discord 在中国大陆区域不可用，如果您在中国大陆购买了此插件，可以凭购买的账号平台、名称，在此QQ群享受售后服务：815351827。

## Info

* MythicTotem is a Spigot plugin for custom BOSS totem summoning.
* No need to "click" on a specific block in the totem to activate it; it offers an experience similar to wither-style placement in the vanilla game.
* 3D totem support.
* Supports both vertical and horizontal placement of totems.
* The player detection process is seamless and can be configured with adjustable intervals.
* Totem size and layouts are unrestricted, breaking free from the traditional limitations like 1x3 or 3x3 found in similar plugins.
* Built-in action and condition systems.
* Easy-to-use totem configuration.
* Support BlockPlaceEvent, PlayerInteractEvent, BlockRedstoneEvent, PlayerDropItemEvent, EntityPlaceEvent as trigger.
* New! Full (Premium) version extra support BlockPistonEvent as listener (trigger)!
* Compatible with blocks from ItemsAdder and Oraxen.
* Support entities like ender crystal, ItemsAdder's furniture and so on in totems! (Premium version only)
* Support custom price for totem and make custom totem key. (Premium version only)
* Hook into PlaceholderAPI.


# ✅Requirements

## Java Version

* Basic Requirement: **Java16+**
* **Java 17+** is <mark style="color:red;">recommended</mark>. Java17 and above versions are recommended, but plugins are compiled using **Java16**, so theoretically, you only need Java16 or higher versions.

## Server Software

| Server          | Can work in your server                                                                                                   | Can get offical support                                                                                                                                                                          |
| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Spigot          | <p>✅<br>Some features does not provide in Spigot servers</p>                                                              | ✅                                                                                                                                                                                                |
| Paper/Purpur    | <p>✅<br>Can provide subtle performance improvements.</p>                                                                  | ✅                                                                                                                                                                                                |
| Folia           | <p>❓<br>Any problems only occurs in Folia servers may not be solved. Plugin is not designed for multi thread support.</p> | <p>❓</p><p>Folia's support is in the <mark style="color:red;">early testing stage</mark> and may be released in official versions or removed in the future. This support is not a guarantee.</p> |
| Other softwares | ❌                                                                                                                         | ❌                                                                                                                                                                                                |

## Server Version

| Version              | Can work in your server                                                                                                   | Can ger offical support |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| **Below 1.14**       | ❌                                                                                                                         | ❌                       |
| **1.14 \~ 1.20.4**   | <p>❓<br>The plugin can run on these versions, however, any issues caused on these versions will not be resolved.</p>      | ❌                       |
| **1.20.5 and above** | <p>✅<br>Using versions <strong>1.21.5</strong> and above is the most recommended, as you can enjoy the best features.</p> | ✅                       |

* If you encounter errors while using a certain version, <mark style="color:red;">please join our Discord feedback</mark>.


# ⚙️Install

## Install

* Put the `.jar` file into your server's `plugins` folder.
* Stop your server and then restart it. <mark style="color:red;">Cannot load plugins in any other way while the server is starting</mark>.
* When updating plugins, please be sure to remove old versions.
* Previously, you used the free version, but now to upgrade to the paid version, you only need to install the paid version on the server and remove the free version. The configuration file of the plugin does not require any changes.
* When downgrading from **a new game version** to **an old version** on the server where the plugin is located, it is important to remove the `items` folder from the configuration file.


# 🔗Compatibility

## **Direct compatibility**

### <mark style="color:red;">Directly</mark> supported entity plugins list

The compatibility of entity plugins includes two points, namely:

* **Spawn:** MythicTotem provides **direct compatibility** with the following **entity plugins**, as evidenced by our provision of corresponding **Actions** for them. For other entity plugins not list below, you can generate entities from them through `console_command` action. For info about **Action Format**, please view [this page](/format/itemformat-tm).
  * MythicMobs
* **Use as Totem Layout**: MythicTotem supports treating entities as part of totems, and by being directly compatible with these entity plugins, you can also consider entities from these plugins as part of totems.
  * ItemsAdder
  * Oraxen

### <mark style="color:red;">Directly</mark> supported block plugins list

{% hint style="warning" %}
Only <mark style="color:red;">**PREMIUM**</mark> version of MythicTotem allows for the use of custom blocks as totem layouts, while the **free** version can only use up to **3** types of custom blocks.
{% endhint %}

By being compatible with these plugins, MythicTotem can recognize blocks from these plugins and consider them as part of the totem.

* ItemsAdder
* Oraxen
* MMOItems
* CraftEngine&#x20;
* Nexo

### <mark style="color:red;">Directly</mark> supported item plugins list

MythicTotem supports use items from these plugins in [ItemFormat](https://ultimateshop.superiormc.cn/format/itemformat-tm).

* ItemsAdder
* Oraxen
* EcoItems
* EcoArmor
* MMOItems
* MythicMobs
* eco
* NeigeItems
* ExecutableItems
* Nexo
* CraftEngine

### <mark style="color:red;">Directly</mark> supported protection plugins list <mark style="color:red;">- Premium</mark>

If players do not have permission to destroy blocks within these protection plugins areas, MythicTotem can prevent totems from being activated in these areas.

* BentoBox
* Dominion
* GriefPrevention
* HuskTowns
* HuskClaims
* Lands
* PlotSquared
* Residence
* Towny
* WorldGuard
* SuperiorSkyblock2

### <mark style="color:red;">Directly</mark> supported stat plugins list

You can add those plugins stat as totem bonus effect.

* MythicLib (Support stat from MMOCore or MMOItems)
* MythicMobs
* AuraSkills&#x20;


# 🛠️Configuration files

The plugin generates the following configuration files, some of which will only be generated after you first use this feature.

* `items`: The location for storing saved item files. It will only be generated after save any item with `/mt saveitem` command. <mark style="color:red;">Do not modify any content here</mark>.
* `languages`: The location for storing language files. You can set the language file used by the plugin through the `config-files.language` option in the `config.yml` file. You can customize various messages within the plugin game through language files. It is not supported to display the corresponding language file based on the player client language. You can only display the same language for all players.
* `totems`: The location for storing totem configuration files.
* `config.yml` file: The location for main common settings for plugins.
* `generated-item-format.yml` file: When using the `/mc generateeitemformat` command, we will parse the item you are holding into an **ItemFormat** and store the parsed **ItemFormat** content in this file.

## Config.yml file content <a href="#config.yml-file-content" id="config.yml-file-content"></a>

CommentIt is recommend that you view this file at GitHub, becuase Wiki's `config.yml` maybe not **latest**. Click [here](https://github.com/PQguanfang/MythicTotem) to view this file on **Github.**

```yaml
# MythicTotem by @PQguanfang
#
# READ THE WIKI: mythictotem.superiormc.cn

debug: false

language: en_US

# Item Price
item-price:
  # Support Value: Bukkit, ItemFormat.
  check-method: Bukkit
  item-format:
    ignore-key:
      - 'lore'
      - 'damage'
      - 'tool.damage-per-block'

cooldown-tick: 5

# Paper only feature.
paper-api:
  save-item: true
  # For paper users, enable this option can use their API to directly get the skull, have the performance improve.
  skull: true

trigger:
  BlockPlaceEvent:
    enabled: true
    require-shift: false
    black-creative-mode: false
  PlayerInteractEvent:
    enabled: false
    require-shift: true
    black-creative-mode: false
  PlayerDropItemEvent:
    enabled: false
    require-shift: false
    black-creative-mode: false
  # Will check end crystal only.
  EntityPlaceEvent:
    enabled: true
    require-shift: false
    black-creative-mode: false
  # This event does not support get the player object, so cooldown-tick option does not effect this trigger.
  # And all actions and conditions that related to player is can not be used.
  # And all placeholders that related to player also can not be used.
  # Otherwise you will get tons of errors on console!!!
  BlockRedstoneEvent:
    enabled: true
  # This event does not support get the player object, so cooldown-tick option does not effect this trigger.
  # And all actions and conditions that related to player is can not be used.
  # And all placeholders that related to player also can not be used.
  # Otherwise you will get tons of errors on console!!!
  # Premium version only.
  BlockPistonEvent:
    enabled: true
```

### Debug

Only enable this if you know what are you doing! It will print tons of debug info on console.

### Cooldown Tick

This means totem check system now have a cooldown system for per player, this can avoid server lag if you have much online players.

Bump it to 20+ if you are facing double action issue.

### Trigger

What events will be listened to check if a valid totem has been placeed correctly.

For now it has 5 events:

* BlockPlaceEvent: will be called when players place the block.
* PlayerInteractEvent: will be called when players click the block.
* PlayerDropItemEvent: will be called when players drop the item on the block. **If you set core block for a totem, player must stand on the center of the core block then drop the item onto the center of the block to active totem.**
* EntityPlaceEvent: will be called when player place ender crystal on the block.
* BlockRedstoneEvent: will be called when redstone actived (the redstone block actived must be a part of the totem layout). **This event does not support get the player object, so cooldown-tick option does not effect this trigger.**
* BlockPistonEvent: will be called when you use piston extend the block, the extened block must be a part of the tote&#x6D;**. This event does not support get the player object, so cooldown-tick option does not effect this trigger.&#x20;**<mark style="color:red;">**Premium version only.**</mark>

All events except **BlockRedstoneEvent** have those options:

* enabled: enable or disable this event trigger feature.
* require-shift: we only check the totem if player is shifting.
* black-creative-mode: we only check the totem if player is not in creative game mode.


# ⌨️Commands & Permissions

## Commands with Permission

#### /mythictotem help

View the help info of this plugin.

#### /mythictotem list

View the list of valid totems. Require `mythictotem.admin` permission to use.

#### /mythictotem reload

Reload the plugin. Require `mythictotem.admin` permission to use.

## Permissions

mythictotem.bypass.protection - Bypass protection check for totem active.


# ❓FAQ

## I have add new totems, but it does not work for me!

* Are you in creative mode? Plugin won't check creative players placed block by default, you can change this in `config.yml` file.

## I have purcahsed premium version, but prices system does not work for me!

* Are you using 2.6.0+ version? 2.5.x has some problems for it.
* Plugin won't enable price system by default, you can enable it at `config.yml` file.

## PlayerDropItemEvent with core block does not work well.

* If you set core block for a totem, player must stand on the center of the core block then drop the item onto the center of the block to active totem with PlayerDropItemEvent.


# 🆚Compare

|                                                                                                                                                                                                                                                                                                                                                                                                     | Free | Premium |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ------- |
| <p><strong>More Trigger Event</strong><br>Premium version supports more trigger event to active totem, like BlockPistonEvent which means you can even use piston to active the totem! For more info, please view <a href="/info/configuration-files">Configuration files</a> page.</p>                                                                                                              | ❌    | ✅       |
| <p><strong>Unlimited 3D Totem Support</strong><br>Premium version allows you create unlimited 3D Totems, while free version can only create up to 3 3D Totem.</p>                                                                                                                                                                                                                                   | ❌    | ✅       |
| <p><strong>Entity as Totem Layout</strong><br>Only <mark style="color:red;"><strong>PREMIUM</strong></mark> version of MythicTotem allows you use entities as totem layout. For more info, please view <a href="/totems/totem-config">Totem Config</a> page.</p>                                                                                                                                    | ❌    | ✅       |
| <p><strong>Unlimited Custom Block as Totem Layout</strong><br>Only <mark style="color:red;"><strong>PREMIUM</strong></mark> version of MythicTotem allows for the use of custom blocks as totem layouts, while the <strong>free</strong> version can only use up to <strong>3</strong> types of custom blocks. For more info, please view <a href="/totems/totem-config">Totem Config</a> page.</p> | ❌    | ✅       |
| <p><strong>Protecion Plugins Hook</strong><br>Premium version can avoid totem actived in protected regions or other player's lands. For more info, please view <a href="/info/compatibility">Compatibilty</a> page.</p>                                                                                                                                                                             | ❌    | ✅       |
| <p><strong>Totem Price &  Bonus Totem Upgrade Price</strong><br>Premium version allows you create price for totem, players must consume price to active totem. A good example is you can make totem key to active totem. For more info, please view <a href="/totems/totem-config/prices-option-premium">Prices Option</a> page.</p>                                                                | ❌    | ✅       |
| <p><strong>More ItemFormat™ Key Support</strong> <br>Premium version can use more ItemFormat™ key. For more info, please view <a href="https://ultimateshop.superiormc.cn/format/itemformat-tm">ItemFormat</a> page.</p>                                                                                                                                                                            | ❌    | ✅       |
| <p><strong>More Advanced Actions</strong> <br>Premium version supports use more advanced actions. For more info, please view <a href="/format/itemformat-tm">Format</a> page.</p>                                                                                                                                                                                                                   | ❌    | ✅       |
| <p><strong>More Advanced Conditions</strong> <br>Premium version supports use more advanced conditions. For more info, please view <a href="/format/itemformat-tm">Format</a> page.</p>                                                                                                                                                                                                             | ❌    | ✅       |
| <p><strong>More...</strong> <br>Many small differences were not mentioned here or, I forgot them put here, and more features that are only available in the paid version will be added in the future!</p>                                                                                                                                                                                           | ❌    | ✅       |


# 📝ItemFormat™

The **Item Format**, **Action Format**, **Condition Format** provided by **MythicTotem** are almost identical to those in UltimateShop. Therefore, they will not be elaborated on in this wiki. Please refer to UltimateShop's wiki for a detailed introduction about them. Click [here](https://ultimateshop.superiormc.cn/format) to view.


# 🎬Action Format

The action format will consist of several options.

## Supported Placeholders

MythicTotem supports those placeholders in ActionFormat and ConditionFormat.

* %player%
* %player\_x%
* %player\_y%
* %player\_z%
* %player\_yaw%&#x20;
* %player\_pitch%&#x20;
* %block\_x%
* %block\_y%
* %block\_z%
* %world%
* %totem\_start\_x% (Only support used in totem config's `actions` section)
* %totem\_start\_y% (Only support used in totem config's `actions` section)
* %totem\_start\_z% (Only support used in totem config's `actions` section)
* %totem\_column% (Only support used in totem config's `actions` section)
* %totem\_raw% (Only support used in totem config's `actions` section)
* %totem\_layout% (Only support used in totem config's `actions` section)
* %totem\_id%&#x20;
* %totem\_center\_x% (Only support used in totem config's `actions` section)
* %totem\_center\_y% (Only support used in totem config's `actions` section)
* %totem\_center\_z% (Only support used in totem config's `actions` section)
* %bonus\_uuid% (Only support unsed in action exist in totem config's `bonus-effects` section)
* %bonus\_level% (Only support unsed in action exist in totem config's `bonus-effects` section)

## Message

Send a message to the player, support color code.

```yaml
actions:
  1:
    type: message
    message: 'Hello!'
```

## Announcement <a href="#announcement" id="announcement"></a>

Send a message to all online players, support color code.

```yaml
actions:
  1:
    type: announcement
    message: 'Hello!'
```

## Title <a href="#title" id="title"></a>

Send title to the player, support the color code.

```yaml
actions:
  1:
    type: title
    main-title: 'Good day'
    sub-title: 'Not bad'
    fade-in: 10
    stay: 70
    fade-out: 30
```

## Particle <a href="#particle" id="particle"></a>

```yaml
actions:
  1: 
    type: particle
    particle: HEART
    count: 20
    offset-x: 0.3
    offset-y: 1.0
    offset-z: 0.3
    speed: 0.01
```

## Effect

Give players potion effect.

```yaml
actions:
  1:
    type: effect
    potion: BLINDNESS
    duration: 60
    level: 1
    ambient: true # Optional
    particles: true # Optional
    icon: true # Optional
```

## Teleport

Teleport player to specified location.

```yaml
actions:
  1:
    type: teleport
    world: LobbyWorld
    x: 100
    y: 30
    z: 300
    pitch: 90 # Optional
    yaw: 0 # Optional
```

## Player Command

Make the player excutes a command.

```yaml
actions:
  1:
    type: player_command
    command: 'tell Hello!'
```

## Op Command

Make the player excutes a command as OP.

```yaml
actions:
  1:
    type: op_command
    command: 'tell Hello!'
```

## Console Command

Make the console excutes a command.

```yaml
actions:
  1:
    type: console_command
    command: 'op {player}'
```

## Spawn vanilla mobs

Spawn vanilla mobs.

```yaml
actions:
  1:
    type: entity_spawn
    entity: ZOMBIE
    world: LOBBY # Optional
    x: 100.0 # Optional
    y: 2.0 # Optional
    z: -100.0 # Optional
```

## MythicMobs spawn

Require MythicMobs.

```yaml
actions:
  1:
    type: mythicmobs_spawn
    entity: Super_Skeleton
    level: 1 # Optional
    world: LOBBY # Optional
    x: 100.0 # Optional
    y: 2.0 # Optional
    z: -100.0 # Optional
    block-as-trigger: true # Optional
```

Want to summon mobs at center of totem, try this config!

```yaml
actions:
  1:
    type: mythicmobs_spawn
    entity: Super_Skeleton
    level: 1 # Optional
    world: LOBBY # Optional
    x: '%totem_center_x%' # Optional
    y: '%totem_center_y%' # Optional
    z: '%totem_center_z%' # Optional
    block-as-trigger: true # Optional
```

## Delay <mark style="color:red;">- Premium</mark>

Make the action run after X ticks.

```yaml
actions:
  1:
    type: delay
    time: 50
    actions:
      1:
        type: entity_spawn
        entity: ZOMBIE
```

## Chance <mark style="color:red;">- Premium</mark>

Set the chance the action will be excuted, up to 100. 50 means this action has 50% chance to excute.

```yaml
actions:
  1:
    type: chance
    rate: 50
    actions:
      1:
        type: entity_spawn
        entity: ZOMBIE
```

## Any <mark style="color:red;">- Premium</mark>

Randomly choose specified amount of actions to execute.

```yaml
actions:
  1:
    type: any
    amount: 2
    actions:
      1:
        type: entity_spawn
        entity: ZOMBIE
      2:
        type: entity_spawn
        entity: SKELETON
      3:
        type: entity_spawn
        entity: WITHER
```

## Conditional <mark style="color:red;">- Premium</mark>

Only players meet the conditions you set here will be able to execute the action.

```yaml
general-actions:
  1:
    type: conditional
    conditions:
      1: 
        type: world
        world: lobby
    actions:
      1:
        type: entity_spawn
        entity: ZOMBIE
```

## Give Item <a href="#give-item" id="give-item"></a>

Should use ItemFormat in `item` option. For more info about Item Format, plaese [click here](https://ultimateshop.superiormc.cn/format/itemformat-tm).

```yaml
actions:
  1:
    type: give_item
    item:
      material: apple # Item Format here
```


# ⚖️Condition Format

The condition format will consist of several options.

## Supported Placeholders

MythicTotem supports those placeholders in ActionFormat and ConditionFormat.

* %player%
* %player\_x%
* %player\_y%
* %player\_z%
* %player\_yaw%&#x20;
* %player\_pitch%&#x20;
* %block\_x%
* %block\_y%
* %block\_z%
* %world%
* %totem\_start\_x% (Only support used in totem config's `actions` section)
* %totem\_start\_y% (Only support used in totem config's `actions` section)
* %totem\_start\_z% (Only support used in totem config's `actions` section)
* %totem\_column% (Only support used in totem config's `actions` section)
* %totem\_raw% (Only support used in totem config's `actions` section)
* %totem\_layout% (Only support used in totem config's `actions` section)
* %totem\_id%&#x20;
* %totem\_center\_x% (Only support used in totem config's `actions` section)
* %totem\_center\_y% (Only support used in totem config's `actions` section)
* %totem\_center\_z% (Only support used in totem config's `actions` section)
* %bonus\_uuid% (Only support unsed in action exist in totem config's `bonus-effects` section)
* %bonus\_level% (Only support unsed in action exist in totem config's `bonus-effects` section)

## World <a href="#world" id="world"></a>

Player must be in the world.

<pre class="language-yaml"><code class="lang-yaml"><strong>conditions:
</strong>  1:
    type: world
    world: lobby
</code></pre>

## Biome

Player must be in the biome.

```yaml
conditions:
  1:
    type: biome
    biome: oraxen
```

## Permission

Player must has the permission.

**Remember that OP players will always have all permissions unless plugin set it not by default, so if you want to test this condition, you have to deop yourself.**

```yaml
conditions:
  1:
    type: permission
    permission: 'group.vip'
```

## Placeholder

Player must be meet the placeholder condition.

Rule can be set to:

* \>=
* <=
* \>
* <
* \== (String)
* \= (Number)
* != (Number or string)
* !\*= (Number or string) Not contains.
* \*= (String) Contains, for example, str \*= string is true, but example \*= ple is false.

```yaml
conditions:
  1:
    type: placeholder
    placeholder: '%player_health%'
    rule: '<='
    value: 5
```

## Trigger <a href="#trigger" id="trigger"></a>

This totem can only be actived with specified trigger. For available trigger event, please view `config.yml` file.

(Added in 2.5.2)

```yaml
conditions:
  1:
    type: trigger
    event: 'PlayerInteractEvent' 
```

## Trigger Item <a href="#trigger-item" id="trigger-item"></a>

This totem can only be actived with specified item.

```yaml
conditions:
  1:
    type: trigger_item
    item: 
      material: 'stone' # Use Item Format
```

## Near Mobs <mark style="color:red;">- Premium</mark> <a href="#near-mobs-premium-version-only" id="near-mobs-premium-version-only"></a>

If there is no corresponding mob within a nearby distance, the condition can be met. It supports both the vanilla mob ID and MythicMobs mob ID.

```yaml
conditions:
  1:
    type: mobs_near
    entity: SkeletonKing
    distance: 50
```

Do not use this condition in many totems and do not make distance too far otherwise this maybe lead to server lag.

## Any <mark style="color:red;">- Premium</mark>

```yaml
conditions:
  1:
    type: any
    conditions:
      1:
        type: placeholder
        placeholder: '%eco_balance%'
        rule: '>='
        value: 200
      2:
        type: placeholder
        placeholder: '%player_points%'
        rule: '>='
        value: 400
```

## Not <mark style="color:red;">- Premium</mark>

```yaml
conditions:
  1:
    type: not
    conditions:
      1:
        type: placeholder
        placeholder: '%eco_balance%'
        rule: '>='
        value: 200
```


# ➗Math Calculate Format

{% hint style="warning" %}
You need set `math.enabled` option to `true` in `config.yml` file and then use format like `%totem_center_y%+5` instead.
{% endhint %}

The **Math Calculation Format** provided by **MythicTotem** are almost identical to those in UltimateShop. Therefore, they will not be elaborated on in this wiki. Please refer to UltimateShop's wiki for a detailed introduction about them. Click [here](https://ultimateshop.superiormc.cn/format/math-calculate-format) to view.


# 📝Totem Config

You can find all totem configs in `totems` folder.&#x20;

```yaml
mode: 'HORIZONTAL'
layouts:
  1:
    - 'AAAAA'
    - 'AAAAA'
    - 'AABAA'
    - 'AAAAA'
    - 'AAAAA'
  2:
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
explains:
  A: 'minecraft:stone'
  B: 'minecraft:dirt'
  C: 'minecraft:netherrack'
actions:
  1:
    type: message
    message: 'Hello World!'
  2:
    type: mythicmobs_spawn
    entity: 'SkeletalKnight'
conditions:
  1:
    type: trigger
    event: 'PlayerDropItemEvent'
core-blocks:
  - B
prices:
  1:
    material: APPLE
    prices-as-key: true
    disappear: true
prices-as-key: true
disappear: true
```

All totem must have its unique ID.

## Mode

Set the mode for totem placement. Support:

* Horizontal&#x20;
* Vertical (DEFAULT)

## Layout

Layout is a string list option, the length of the string in each line must be the same. String on each line consist of multiple characters in `explains` option.

The player must place the blocks according to this layout to activate the totem.

## Layouts (3D Totem) <mark style="color:red;">- Premium</mark>

You can also use `layouts` option to make this totem be a 3D totem. For now, only horizontal mode totem suppot 3D totem. &#x20;

**Free version can only create up to 3 3D totems!**

For example:

1 is the top, 2 is below 1.

```yaml
  layouts:
    1:
      - 'AAAA'
      - 'BBBB'
      - 'CCCC'
    2:
      - 'CCCC'
      - 'BBBB'
      - 'AAAA'
```

## Explains

Each line for this option consists of `key: value`. The `key` is a character which is used in layout option. The `value` is which material is the character mean.

The material can be set to:

* `none`, this means this position block is not limited, and it will also not be removed if disappear option is enabled. You can regard it as a position not in the totem.
* `minecraft:<Minecraft Block ID>`, like minecraft:stone.
* `minecraft:<Minecraft Entity ID>:<Check Distance>`, like `minecraft:ENDER_CRYSTAL` or `minecraft:ENDER_CRYSTAL:1` **.**

{% hint style="warning" %}
Only <mark style="color:red;">**PREMIUM**</mark> version of MythicTotem allows you use entities as totem layout.

Only <mark style="color:red;">**PREMIUM**</mark> version of MythicTotem allows for the use of custom blocks as totem layouts, while the **free** version can only use up to **3** types of custom blocks.
{% endhint %}

* `itemsadder:<NamespaceID>:<Block ID>`, like `itemsadder:blocks:block_1`.
* `itemsadder_furniture:<NamespaceID>:<Furniture ID>:<Check Distance>`, like `itemsadder_furniture:highitems:corrupted_head:0.5`.
* `itemsadder_mob:<NamespaceID>:<Mob ID>:<Check Distance>`**.**
* `oraxen:<Item ID>`, like `oraxen:block_1`.
* `oraxen_furniture:<Furniture ID>:<Check Distance>`**.**
* `mmoitems:<Block ID>`, like `mmoitems:10`, **block id (is a number, not item id)** is a number been set by your block configs, not item ID.
* `craftengine:<NamespaceID>:<Block Item ID>`, like `craftengine:default::palm_log`.
* `nexo:<Item ID>`, like `nexo:block_2`.

Totem now work for you? Check your `config.yml` file, your `black-creative-mode` maybe enabled!

For `<Check Distance>` is mean check the distance of nearby entities at this location, which defaults to 0.5, representing the distance of exactly one block.

{% hint style="info" %}
If you are using entity as totem layout, don't forgot change those things in config.yml file, otherwise after you place the "entity", plugin won't check them.

```yaml
  PlayerInteractEvent:
    enabled: true # <-- Change this to true
    require-shift: false # <-- Change this to false
    black-creative-mode: false
```

{% endhint %}

## Actions

The actions performed after the totem is activated.

Use **Action Format** here, for more info, please view [this page](/format/itemformat-tm).

## Conditions

Players or totems must meet these conditions to activate.

Use **Condition Format** here, for more info, please view [this page](/format/itemformat-tm).

## Prices <mark style="color:red;">- Premium</mark>

Players will cost prices to build totems, if players didn't meet the prices (all prices should be meet), the totems won't active!

See [Prices](/totems/totem-config/prices-option-premium) to learn more.

## Prices as Key <mark style="color:red;">- Premium</mark>

You MUST set only 1 price in prices option, and this only price MUST be a item price, like:

```yaml
prices:
  1:
    material: APPLE
```

**Do not make more than 1 price! Otherwise it won't work!**

After enable this, player must hold or drop price item to active totem. In this way, prices will make a feature like: 'Totem Active Key'!

## Core Block

This totem will have "core block" if this option exists, player must last place this block, interact this block or drop item on this block to active totem.

## Disappear

Does the totem disappear after activation?

## Bonus Effects

```yml
bonus-effects:
  enabled: true
  range: 16
  effects:
    enabled: true
    1:
      type: MythicMobs
      modifier-type: SET # ADD, SET, MULTIPLY, COMPOUND
      stat: HEALTH
      value: 100
  apply-actions:
    1:
      type: message
      message: 'Totem effect actived!'
  remove-actions:
    1:
      type: message
      message: 'Totem effect removed!'
  circle-actions:
    1:
      type: give_item
      item:
        material: apple
    2:
      type: message
      message: 'Totem effect executed!'
```

For more info, please view [this page](/totems/bonus-effects-for-totem).


# Prices Option - Premium

Prices option is a little complex, so I introduce it on a separate page.

**Free version can not use this feature!**

**This option is optional, if you didn't add this, this means totem price is free.**

## Item Price

You can set item as price, should use Item Format at [this](https://ultimateshop.superiormc.cn/base/item-format) page.

**Example:**

```yaml
    1:
      material: APPLE
      name: 'Magic Apple'
      custom-model-data: 5
      amount: 10
```

## Item Match - Require MythicChanger <a href="#item-match-require-mythicchanger" id="item-match-require-mythicchanger"></a>

Item Match has those options:

* match-item: Determine the match rule of the price item.

For more info, please view [this page](/features/custom-item-match-method).

**Example:**

```yaml
    1:
      match-item:
        items:
          - 'ender_pearl'
        has-name: true
```

## Hook Economy

Hook economy has those options:

* economy-plugin: What plugin you want this price economy hook into, for now, **MythicTotem** supports `Vault, GamePoints, PlayerPoints, CoinsEngine, UltraEconomy, EcoBits, RedisEconomy, PEconomy`.
* economy-type: If economy plugin is multi-currency economy plugin, you have to type currency name here.

**Example:**

```yaml
  1:
    economy-plugin: Vault
    # If you set Economy plugin to CoinsEngine, then:
    # economy-plugin: CoinsEngine
    # economy-type: Coin
    # Yeah, you need add economy-type option here because its a multi-currency plugin.
```

## Vanilla Economy

Vanilla economy has those options:

* economy-type: Supports `exp, levels`.

**Example:**

```yaml
  1:
    economy-type: levels
```

## Free

Just set `free: true` here.

## General Options

Those options can be used in the 4 types of price. **All of them are optional.**

* amount: The amount of items or economy price values. Like `1`.&#x20;


# ✨Bonus Effects for Totem

```yaml
bonus-effects:
  enabled: true
  default-level: 1
  max-level: 5
  # group: 'advanced'

  1:
    range: 16
    period-ticks: 60

    price:
      material: diamond
      amount: 64
      placeholder: 'Diamond x{amount}'

    description: '10 Health + Each 3 seconds give 1 apple'

    effects:
      enabled: true
      1:
        type: MythicMobs
        modifier-type: ADD
        stat: HEALTH
        value: 10

    apply-actions:
      1:
        type: message
        message: "§aLv1 Totem start！"

    remove-actions:
      1:
        type: message
        message: "§cLv1 Totem end！"

    circle-actions:
      1:
        type: give_item
        item:
          material: apple


  2:
    range: 20
    period-ticks: 40

    price:
      material: diamond
      amount: 128
      placeholder: 'Diamond x{amount}'

    description: '15 Health + Each 2 seconds give 1 golden apple'

    effects:
      enabled: true

      1:
        type: MythicMobs
        modifier-type: ADD
        stat: HEALTH
        value: 15

    apply-actions:
      1:
        type: message
        message: "§bLv2 Totem start！"

    remove-actions:
      1:
        type: message
        message: "§7Lv2 Totem ended！"

    circle-actions:
      1:
        type: give_item
        item:
          material: golden_apple


  3:
    range: 30
    period-ticks: 20

    price:
      material: diamond
      amount: 256
      placeholder: 'Diamond x{amount}'

    description: '20 Health + Each 1 second give 1 enchanted golden apple'

    effects:
      enabled: true
      1:
        type: MythicMobs
        modifier-type: ADD
        stat: HEALTH
        value: 20

    apply-actions:
      1:
        type: message
        message: "§6Lv3 Ultimate Totem Start！"

    remove-actions:
      1:
        type: message
        message: "§8Ultimate Totem ended！"

    circle-actions:
      1:
        type: give_item
        item:
          material: enchanted_golden_apple
```

## Note

* All options in this page require restart the server to take effect.
* Make sure you disable `disappear` option in your totem configs to use this feature.
* Make sure your totem layout must not include entity.
* This feature does not support **Folia** servers.
* This feature is disabled in `config.yml` and totem configs, you need enable them in both files if you want to use this feature.

## Enabled

Whether to enable this function.

## Default Level

The default level of the bonus after totem actived, default set to 1.

## Max Level

&#x20;The maximum level of the bonus totem can upgraded.

## Group

Set the group the totem, only use in limit feature.

## Each Level settings:

The section starting with the number **1** represents the bonus settings for the corresponding level. The numbers should be continuous and set up to the maximum level. If a level is exactly the same as the settings of the previous level, you can skip that level.

### Range

The range of the bonus effect. Support 2 formats:

```yaml
range: 16
```

### Price <mark style="color:red;">- PREMIUM</mark>

The price player need cost to upgrade to this level, you can check [this page](/totems/totem-config/prices-option-premium) for more info.

### Description

A message that display in totem GUI.

### Effects

Set libreforga effects or built-in bonus effect to this totem.

#### libreforge Effects <a href="#libreforge-effects" id="libreforge-effects"></a>

MythicTotem does not package libreforege, you have to purcahse any of Auxilor's plugin that package libreforage then install it in your server to make this work!

If you want to a totem has libreforge effects, you need do those things:

* Set `libreforge-hook` option in `config.yml` to `true`.
* Set `bonus-effects.effects.enabled` option in totem configs to `true`.&#x20;
* Add effects at `config.yml`'s libreforge-effects option. **Please note that effect ID must same as totem ID.**

{% hint style="info" %}
If you have installed MythicPrefixes in your server, you must **make sure** none of the totem IDs conflict with the tag IDs in MythicPrefixes; otherwise, using this feature may cause issues.
{% endhint %}

An example:

```yaml
libreforge-effects:
  - id: default # Effect ID
    effects:
      - id: bonus_health
        args:
          health: 40
      - id: damage_multiplier
        args:
          multiplier: 4.0
        triggers:
          - melee_attack
    conditions: []
```

#### Built-in Effects <a href="#built-in-effects" id="built-in-effects"></a>

If you want to a totem has built-in effect bonus, you need do those things:

* Set `bonus-effects.effects.enabled` option in tag configs to `true`.
* Add below contents at your totem config if it is not exist.
* If you removed BUFF here, you need to restart the server.

**MythicLib**

Add stats from MythicLib plugin. (Support stats from MMOCore, MMOItems)

<pre class="language-yml"><code class="lang-yml">  effects:
    enabled: true
    1: 
<strong>      type: MythicLib
</strong>      stat: MAX_HEALTH # Stat ID
      value: 1 # Add value
    2: # More effects...
</code></pre>

**MythicMobs**

Add stats from MythicMobs plugin.

If you are getting **NoSuchMethod** error, this means you are using old version of MythicMobs, you need update it to **LATEST**. By default, all stats exist in MythicMobs are disabled, you need enable them in `plugins/MythicMobs/stats.yml` file or other stat configs.

```yml
  effects:
    enabled: true
    1: 
      type: MythicMobs
      modifier-type: SET # ADD, SET, MULTIPLY, COMPOUND
      stat: HEALTH
      value: 100
    2: # More effects...
```

**AuraSkills**

Add stats from AuraSkills plugin.

Since AuraSkills is saving the stat modifier, so if your server crash, totem bonus effects config change or other situations where the player's stat may not be cleared properly. Although MythicTotem consider this problem, if it still occur in your server: You can try restarting the server. If this does not solve the problem, you will have to use the `/skills modifier removeall` command for every players.

```yaml
  effects:
    enabled: false
    1:
      type: AuraSkills
      stat: HEALTH
      value: 100
    2: # More effects...
```

**Condition**

You can set condition for effects. Just try add `conditions` section here.

```yml
  effects:
    enabled: true
    1:
      type: MythicLib
      stat: MAX_HEALTH
      value: 100
      bypass-condition-after-apply: true
      conditions:
        1:
          type: world
          world: lobby
```

There is also a option called `bypass-condition-after-apply` option available, if set to `false`, plugin will auto remove effect if we found player no longer meet the condition of effect.

### Period Ticks

How often should the actions in "circle actions" be executed, in ticks.

### Apply Actions

The action executed when the totem effect actived.

### Remove Actions

The action executed when the totem effect removed.

### Circle Actions

The action executed between the totem effect active.

## Settings in config.yml file

```yml
bonus-effects:
  enabled: true
  check-radius: 10
  range-display:
    enabled: true
    particle: END_ROD
  limit:
    enabled: true
    value:
      default:
        default: 1
        vip: 2
      # Group ID
      # advanced:
      #   default: 1
      #   vip: 1
    conditions:
      vip:
        1:
          type: permission
          permission: 'group.vip'
    same-totem-only-active-once: true
  gui:
    enabled: true
    title: 'Totem Info'
    size: 27
    ignore-click-outside: false
    totem-info-item:
      slot: 11
      material: BEACON
      name: '&eTotem Info'
      lore:
        - '&7Totem ID: {totem_id}'
        - '&7Totem Range: {bonus_range}'
        - '&7Totem Level: {bonus_level}'
        - '&7Totem Bonus:'
        - '&7{bonus_description}'
        - '&bYou'
        - '&7Totem Limit: {bonus_limit}'
        - '&7Active Bonus Amount: {bonus_amount}'
    totem-upgrade-item:
      slot: 15
      material: EMERALD_BLOCK
      name: '&cUpgrade'
      lore:
        - '&7Upgrade Bonus:'
        - '&7{next_description}'
        - '&7Next Level: {next_level}'
        - '&7Price: {next_price}'
    totem-max-upgrade-item:
      material: BARRIER
      name: '&4MAX LEVEL'
      lore:
        - '&7Upgrade Bonus:'
        - '&7{bonus}'
```

### Enabled

Whether enable this feature.

### Check Radius

Each player checks the totems within a certain distance nearby. For example, this represents checking if there are valid totems only within a 10-square range nearby.

### Range Display

Support use particle to display totem range.

<figure><img src="https://1703089369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9kZBh1lGlCB7u32oI7dv%2Fuploads%2FMfo08bnLRdl2OwKEPy4u%2F3a8f1bf736e9b45e02132fc010f6ad2b.png?alt=media&amp;token=0f36f2fa-3512-4d88-a892-360986a98e46" alt=""><figcaption></figcaption></figure>

## Limit

By deafult, common player can only active 1 bonus totem, and players who have `group.vip` permission can active extra 1 bonus totem. This can be changed here.

The default section means: By default, the maximum limit shared by all bonus totems, this does not represent a group called `default`, and this section cannot be deleted.

The section below `default` are for different groups. You can set group at each bonus totem config.

## GUI

You can open GUI by clicking the totem blocks.


# 📚Example: Common 2D Totem

## Config

```yaml
mode: 'VERTICAL'
layout:
  - 'AAA'
  - 'BBB'
  - 'CCC'
explains:
  A: 'minecraft:stone'
  B: 'minecraft:end_stone'
  C: 'minecraft:netherrack'
actions:
  1:
    type: message
    message: 'Hello!'
  2:
    type: mythicmobs_spawn
    entity: CAVE_SPIDER
conditions: []
```

## In-game layout

<figure><img src="https://1703089369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9kZBh1lGlCB7u32oI7dv%2Fuploads%2FjZdeGPVFpyesSKTJpBhp%2Fimage.png?alt=media&amp;token=57e2ff29-c7a2-4036-92f1-31f97acb1392" alt=""><figcaption></figcaption></figure>


# 📚Example: Common 3D Totem

## Config

```yaml
mode: 'HORIZONTAL'
layouts:
  1:
    - 'AAAA'
    - 'BBBB'
    - 'CCCC'
  2:
    - 'CCCC'
    - 'BBBB'
    - 'AAAA'
explains:
  A: 'minecraft:stone'
  B: 'minecraft:dirt'
  C: 'minecraft:netherrack'
actions:
  1:
    type: message
    message: 'Hello!'
  2:
    type: mythicmobs_spawn
    entity: CAVE_SPIDER
conditions: []
disappear: true
```

## In-game layout

<figure><img src="https://1703089369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9kZBh1lGlCB7u32oI7dv%2Fuploads%2FYA4BGktzAh2PQVKwNiUi%2Fimage.png?alt=media&amp;token=6447503e-d411-430b-9c52-10a87f61cbb3" alt=""><figcaption></figcaption></figure>


# 📚Example: Ender Crystal Totem

## Config

```yaml
mode: 'HORIZONTAL'
layouts:
  1:
    - 'AAAAA'
    - 'AAAAA'
    - 'AABAA'
    - 'AAAAA'
    - 'AAAAA'
  2:
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
explains:
  A: 'minecraft:end_stone'
  B: 'minecraft:obsidian'
  C: 'minecraft:diamond_block'
actions:
  1:
    type: message
    message: 'Hello!'
  2:
    type: mythicmobs_spawn
    entity: SkeletalKnight'
conditions: []
# Core block means what block player should place ender crystal on.
core-blocks:
  - B
disappear: true

# Can also be:
#mode: 'HORIZONTAL'
#layouts:
#  1:
#    - 'CCDCC'
#    - 'CCCCC'
#    - 'DCCCD'
#    - 'CCCCC'
#    - 'CCDCC'
#  2:
#    - 'CCBCC'
#    - 'CCCCC'
#    - 'BCCCB'
#    - 'CCCCC'
#    - 'CCBCC'
#explains:
#  A: 'none'
#  B: 'minecraft:obsidian'
#  C: 'none'
#  D: 'minecraft:ENDER_CRYSTAL'
#
```

## Info

We use `trigger` condition to make this totem can only be active when player place ender crystal onto a block, and `core-blocks` option and can help us make this totem can only actived when player place ender crystal onto this block.


# 📚Example: Entity Totem

## Config

```yaml
mode: 'HORIZONTAL'
layouts:
  1:
    - 'AAAAA'
    - 'AAAAA'
    - 'AABAA'
    - 'AAAAA'
    - 'AAAAA'
  2:
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
explains:
  A: 'minecraft:stone'
  B: 'minecraft:dirt'
  C: 'minecraft:netherrack'
actions:
  1:
    type: message
    message: 'Hello!'
  2:
    type: mythicmobs_spawn
    entity: SkeletalKnight'
conditions: []
# Core block means what block player should drop item on.
core-blocks:
  - B
prices:
  1:
    material: APPLE
    amount: 1
prices-as-key: true
disappear: true
```

## Info

* We make ender crystal be a part of this totem instead of make it be active requirement.
* You can also set ender crystal to other entities.
* Totem with entities as layout require PREMIUM version of MythicTotem.


# 📚Example: Totem with a Key required

## Config

```yaml
mode: 'HORIZONTAL'
layouts:
  1:
    - 'AAAAA'
    - 'AAAAA'
    - 'AABAA'
    - 'AAAAA'
    - 'AAAAA'
  2:
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
    - 'CCCCC'
explains:
  A: 'minecraft:stone'
  B: 'minecraft:dirt'
  C: 'minecraft:netherrack'
actions:
  1:
    type: message
    message: 'Hello World!'
  2:
    type: mythicmobs_spawn
    entity: 'SkeletalKnight'
conditions:
  1:
    type: trigger
    event: 'PlayerDropItemEvent'
# Core block means what block player should drop item on.
core-blocks:
  - B
prices:
  1:
    material: APPLE
    amount: 1
prices-as-key: true
disappear: true
```

## Info

* We make this totem can only be actived with PlayerDropItemEvent, so player have to drop item to active this totem.
* We also set core block for this totem, so player have to drop item onto specified blocks to active this totem.
* We also set prices for this totem, so player's drop item will consume and disappear because this totem need price to active.
* Price feature is only available for PREMIUM version of MythicTotem.


# 🌏Advanced Language Managment

## Default Language

You can set default language at `config.yml` file.

```yaml
config-files:
  language: en_US
  # Premium version only.
  per-player-language: true
```

The input here is the name of the language file (without the suffix). All language files are stored in the "`languages`" folder. You can also create a new language file by simply copying the "`en_US.yml`" file and renaming it to the corresponding language code. For example, `zh_CN.yml`.

## Per Player Language <mark style="color:red;">- Premium</mark>

You can enable `per-player-language` at `config.yml` file. After being enabled, the plugin will determine which language file to display to the player based on their client language. The server must have the relevant language files preloaded; otherwise, it will display content using the default language file.

Let us watch this video to understand it!

## Lang Placeholder

You can use `{lang:<langKey>}` placeholder in plugin message to enable players from all over the world to display language settings that match their client.

You can add your desired custom language text under the "`override-lang`" section of each language file, in the format of "`ID: text content`". For example:

```yaml
// ... The content originally present in the language file

# Added content
override-lang:
  # This means shop-title it's language key.
  shop-title: 'Item Shop'
```

```yaml
// ... The content originally present in the language file

# Added content
override-lang:
  # This means shop-title it's language key.
  shop-title: '物品商店'
```

Then use `{lang:shop-title}` in the place you want to use.

In `config.yml`, you can directly use `{lang}` to represent the custom language from the language file to be used. The language ID should be synchronized with the configuration file structure in the `config.yml` file, for example:

In `config.yml` file:

```yaml
placeholder:
  # Premium version only
  compare:
    up: '{lang}'
    down: '{lang}'
    same: '{lang}'
```

In each language file:

```yaml
// ... The content originally present in the language file

override-lang:
  placeholder:
    compare:
      up: '↑'
      down: '↓'
      same: '-'
```

Similarly, if we cannot find this custom language in the corresponding language file, we will search for it in the default language file. If it is still not found, then the plugin will not parse this placeholder.

## Advanced Message Format <mark style="color:red;">- Premium</mark>

The default language text is directly filled into the text content that needs to be output, along with [color codes](https://ultimateshop.superiormc.cn/features/color-code). However, you can also utilize this feature to enable the plugin to display not only regular chat box messages, but also actionbars, titles, bossbars, sounds, and more!

You can still use color codes (including MiniMessage) while using our advanced message format.

### Common Usage

```yaml
welcome: 'Welcome to the server!'
```

### Chat Message

```yaml
welcome: '[message]&aWelcome![/message]'
```

### Title

<pre class="language-yaml"><code class="lang-yaml"><strong>welcome: '[title=20,60,20]&#x26;6Welcome;;&#x26;eThis is sub title[/title]'
</strong># Format: [title=fadeIn,Stay,fadeOut]title;;subTitle[/title]
</code></pre>

### Both Chat Message and Title will be sent

You can mix and match these different message types, just like this.

```yaml
welcome: '[message]&aGood day![/message][title=20,60,20]&6Welcome;;&eThis is sub title[/title]'
```

### Action Bar

```yaml
welcome: '[actionbar]&7Please wait...[/actionbar]'
```

### Boss Bar - Early Alpha

```yaml
welcome: '[bossbar=GREEN,SOLID,1.0]&aHappy Today[/bossbar]'
```

### Sound

```yaml
welcome: '[sound=ENTITY_EXPERIENCE_ORB_PICKUP,1,1][/sound][sound=ENTITY_PLAYER_LEVELUP,1,1][/sound]'
```


# 🎨Color Code

We provides 2 color code format. The plugin will automatically determine which color code format you are using so you don't need set anything about this.

## MiniMessage <a href="#minimessage" id="minimessage"></a>

* You can check this format [here](https://docs.advntr.dev/minimessage/format.html).
* Requrie Paper or it's fork and at least 1.17.1 server version.
* Can use many advanced feature like font, hover or more.
* You can almost it everywhere.

## Built-in Color Parser <a href="#built-in-color-parser" id="built-in-color-parser"></a>

* Format:
  * To use hex color, you should use special color code, it should like this: **`&#Hex color code`**
  * For example, `&#ff0000`.
  * To use gradient color, you should use special gradient color code, it should like this: **`&<#Start Color Code> Message &<#End Color Code>`**
  * For example, `&<#666666>UltimateShop &<#ffffff>`.
  * To use common color, an example is `&b`.
  * For version below 1.16, we will auto teanslate hex color to common color.
* Support all versions and server core.
* Only useful color feature supported.
* You can use it everywhere.
* For Paper users who meet use MiniMessage requirements, we will auto translate built-in color parser to MiniMessage format.


# 💾Saved Item (Item Manager)

## Create your item <a href="#create-your-item" id="create-your-item"></a>

You can create your own item at `items` folder of plugin, just create a **yml** file and then follow [ItemFormat](https://ultimateshop.superiormc.cn/format/itemformat-tm) in this file. The file name is the item ID.

## Save your item <a href="#save-your-item" id="save-your-item"></a>

You can use command `/mt saveitem <saveItemID> <saveItemMethod>` command to save your hold item. There are 2 methods to save item.

* Bukkit
  * If you are using Spigot version of UltimateShop: Use BukkitAPI's method to save item. The method only support saving vanilla data and persistent data stored through BukkitAPI, and other custom NBT data from other plugins will not be saved.
  * If you are using Paper version of UltimateShop: Use PaperAPI's method to save item, this new method can 100% save item data, no data will lose. **(Paper and 1.15+ server only)**
* ItemFormat: will parse item into [Item Format](https://ultimateshop.superiormc.cn/format/itemformat-tm).

An example for item config file that use Bukkit save item method with Paper version of UltimateShop:

```yaml
item: !!binary |-
  H4sIAAAAAAAA/21RzW4TMRCeJd0oWVB/1IIQXILEG/TGpSDxCKhXa2LPbkxsz8qepUlPPAonXoBn6nsw27TaViBZljzz/XmmAZjBy68oeE25eE4Ap3cLeOEdnEWfyGZs5ZPzGDm5GdSWhyQAMG+gsRx7TpSkNHA8gVtmRS7TINnLvSLUNTQFZcg4Fj7/Aqjg2GIyGG5wXwyhVJrj7SQScWeKoN2a4m9pNFw+9QicqdFqtRgj6QuOuoz7BRwJ7QQuvm18WenJhCHsV8lb+qCeHycFSnaDSaLGN13wevMPytk7qhp4819cmT2diVacT90YAhp4PTXsUISjSRhpSrcOAz2me/Vl1emMVuWGs1Pu+3+4kR0F43QrS5i3gVFKPRpd/dR7Ae8mwvdhS2vemT7gHteB4HzqsWzGnTp6th5hDjM4dRixI9NTNuvAdnvY0oWjFocgRvH6OVN6Inf1u22XUOchUHkY+vyeU+Bk0tXgiSo4s5wzWTEtZ+My96WqoT7o/Lm8VDr8BZMVpHJ0AgAA
```

An example for item config file that use ItemFormat save item method with Paper version of MythicTotem:

```yaml
material: DIAMOND
amount: 6
name: <blue>A good sword
lore:
- <gray>This is really nice!
custom-model-data: 1
max-stack: 6
food:
  nutrition: 5
  saturation: 5.0
tool:
  damage-per-block: 5
  mining-speed: 1.3
  rules:
  - STONE, 1.4, true
song: minecraft:otherside
glow: true
enchants:
  mending: 1
```

## Use saved item <a href="#use-saved-item" id="use-saved-item"></a>

You can use saved item in [ItemFormat](https://ultimateshop.superiormc.cn/format/itemformat-tm). In ItemFormat, there is a option called `material`, by default, you need type vanilla item ID there, but, you can also use saved item id to let plugin directly get the saved item instead of generate a whole new item with that type.

```yaml
display-item:
  material: superior_sword # If saved item id is 'superior_sword'
```

Saved items will be cached in memory continuously after loading to avoid repeatedly reading the saved item file, which may consume too much server performance. However, the cost is that if you have too many saved items, it may correspondingly consume more memory.


# 🔍Custom Item Match Method

## Default Item Match Method <a href="#default-item-match-method" id="default-item-match-method"></a>

### Vanilla Items <a href="#vanilla-items" id="vanilla-items"></a>

By default, we support two item price match method, they are:

* Bukkit: This match method require inventory's item must 100% same as the price item, if the item player has changed some thing, it can not be matched anymore. For example, add enchantments or change item name in anvil, they will change item's NBT info.
* ItemFormat: ItemFormat can set ignore list of item's vanilla NBT. If you add enchants and name in ignore list, then player can still use this item as price even the item has more enchantments or changed item name.

Example config:

```yaml
item-price:
  # Support Value: Bukkit or ItemFormat.
  # For each product, you can add match-item section to make custom match method, for more info, please view Wiki.
  check-method: Bukkit
  # Only support ItemFormat match method.
  item-format:
    require-same-key: false
    ignore-key:
      - 'lore'
      - 'damage'
      - 'enchants'
      - 'tool.damage-per-block'
      - 'nbt.CustomNBTKey'
```

For options in `item-format` section:

* require-same-key: This means that the items in the shop must have all the data of the items owned by the player.&#x20;
* ignore-key: The list of ItemFormat™ Key that will be ignored when check whether items are same.&#x20;

You can parse the ItemFormat of a handheld item by using the command `/fc generateeitemformat`, and the key can also be indented. For example, if you only want to ignore the sharpness enchantment and do not want to ignore other enchantments, you can fill in `enchants.sharpness` in ignore-keys option instead of `enchants`.

### Third-plugin Item <a href="#third-plugin-item" id="third-plugin-item"></a>

Items generated by [Supported Plugins](broken://pages/Ee0fZ4Z6Pl0L7sU8AVSa) will auto parse it's Item ID and compare it with the item ID you set in Item Format's `hook-item` option, so no matter how it changes, it will eventually match normally.

## Custom Match Method for each product - Require MythicChanger <a href="#custom-match-method-for-each-product-require-mythicchanger" id="custom-match-method-for-each-product-require-mythicchanger"></a>

Although the **ItemFormat** method described above solves the problem of items being modifiable, its flexibility is still insufficient. Therefore, this feature can help you set custom price match modes for each item price.

You can **add** a `match-item` section in the configuration of each **price**, which means that if the item meets this matching rule, it is considered match.

This feature require your server must install **MythicChanger** plugin, please get it here:

**FREE:** [Click to download](https://www.spigotmc.org/resources/mythicchanger-match-and-modify-all-your-items-without-trouble-1-14-1-21.98523/)

**PREMIUM:** [Click to download](https://www.spigotmc.org/resources/mythicchanger-premium-match-and-modify-all-your-items-without-trouble-1-14-1-21.115913/)

For how to configure the `match-item` section, please read MythicChanger's wiki, [click here to visit](https://mythicchanger.superiormc.cn/configs/match-item). Please note that some of the match rules require **PREMIUM version of MythicChanger.**

An example product config can be found at [this page](/totems/totem-config/prices-option-premium).


