# AdvancedPlugins Wiki

Welcome! Here you can find information about Advanced Plugins.

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>


# Config Items

How items are configured in AdvancedPlugins

All AdvancedPlugins use similar item configuration format. You can follow this guide to configure your items.

## Item Configuration

### **type**

item's material

### **id**

item's durability

### **amount**

item's amount

### **name**

item's custom name

### **lore**

item's custom lore

### **item-flags**

list of item flags applied to items

### **custom-model-data**

item's custom model data for custom textures

### **armor-trim**

set item's trim material and pattern (new in Minecraft 1.20)

* format: `'MATERIAL;PATTERN'`, e.g. `QUARTZ;COAST`
* Trim material: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/trim/TrimMaterial.html>
* Trim pattern: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/trim/TrimPattern.html>
* **force-glow**

set whether item should glow or not

### **enchantments**

list of enchantments applied to item

### **custom-enchantments**

list of custom enchantments \**present in AdvancedEnchantments only*

### **rgb-color**

item's color (applyable for colored leather armor)

### **nbt**

set item's custom nbt (json format)

### **owner**

skull's owner. It can be player username or base64

### **unbreakable**

set item unbreakable (boolean - true/false)

### **itemsadder**

use custom item from ItemsAdder plugin (item's name)

## Configuration Example

```yaml
item: 
  amount: 1
  name: '&cCustom chestplate'
  lore:
    - '&dExclusive from &dVillagers'
  enchantments:
    - 'Protection:20'
    - 'Unbreaking:2'
  custom-enchantments:
    - 'glow:1'
  item-flags:
    - 'HIDE_ENCHANTS'
  custom-model-data: 1
  armor-trim: 'DIAMOND;SILENCE'
  force-glow: false
  rgb-color: 255;0;0
  owner: 40b7ff035bb8761eb40e86f3a17faee349dbcccd84a77703b47e9894a1df847f #base64
  nbt: '{CanDestroy:["minecraft:diamond_ore"],CustomNBTData:"test:true"}'
  unbreakable: true
  itemsadder: 'lava_pickaxe'
```

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>


# Colors

Most of our plugins have HEX & gradient support in messages & UIs.

## Hex

Format: `{#HEX}`\
Example: `{#FF0000}`

## Gradient

Format: `<gradient:#HEX_FROM,#HEX_TO>text</gradient>`\
Example: `<gradient:#FF0000,#0000FF>Hello Advanced!</gradient>`


# Introduction

New effects system that brings all our plugins into one.

We have launched a new effects system to unify all of our plugins which use effects (Enchantments, Pets and Mobs) into one system working together.

## Explanation

Abilities are a unique implementation of completely customizable abilities. Abilities can be a powerful tool for adding dynamic gameplay mechanics. By combining effects, triggers, targets, conditions and effects, you can create a wide variety of actions and reactions in your plugin.

* [Effects](/abilities/effects)
* [Triggers](/abilities/triggers)
* [Targets](/abilities/targets)
* [Conditions](/abilities/conditions)
* [Functions](/abilities/functions)
* [Variables](/abilities/variables)
* [Pointers](/abilities/pointers)

### Examples

```yaml
    chance: 30 # Chance is optional, default is 100
    cooldown: 5 # Cooldown is optional, default is 0
    cooldownMessage: "&cThis ability is in cooldown!" # Optional cooldown message
    effects:
      - 'LIGHTNING @Victim'
      - 'FIREBALL @Victim'
      - 'MESSAGE:You have been &bfrozen! @NearestPlayer{r=3}'
      - 'FREEZE:10 @NearestPlayer{r=3}'
```

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>


# Effects

Effects are the actions that will be performed when an ability is activated. Examples of effects include damaging an entity, healing an entity, or teleporting an entity. There are many different types of effects available, each with their own unique properties and parameters.

## Effect examples

```yaml
effects:
- 'BURN:40'
- 'MESSAGE:<random word>Hello,Hi,Greetings</random word> %victim name%!'
```

In this example, when the trigger occurs, the victim will be set on fire for 2 seconds, a random greeting will be sent to the victim with their name.

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>

## Effect List

There are many different types of effects that can be used in our ability system. Some of the effects available are:

<table data-full-width="true"><thead><tr><th width="439">Usage</th><th>Description</th></tr></thead><tbody><tr><td><code>ACTION_BAR:&#x3C;TEXT></code></td><td>Send an actionbar message</td></tr><tr><td><code>ADD_DURABILITY_CURRENT_ITEM:&#x3C;AMOUNT></code></td><td>Modify durability of main item</td></tr><tr><td><code>ADD_DURABILITY_ARMOR:&#x3C;AMOUNT></code></td><td>Armor durability: <code>− = damage</code>, <code>+ = repair</code>. Ex: <code>ADD_DURABILITY_ARMOR:-10</code></td></tr><tr><td><code>ADD_DURABILITY_ITEM:&#x3C;SLOT>:&#x3C;AMOUNT></code></td><td>Repair item</td></tr><tr><td><code>ADD_FLY_SPEED</code></td><td>Adds to the player's fly speed (from -1 to 1)</td></tr><tr><td><code>ADD_FOOD:&#x3C;AMOUNT></code></td><td>Modify player's food level</td></tr><tr><td><code>ADD_HEALTH:&#x3C;HEALTH></code></td><td>Add health to entity</td></tr><tr><td><code>ADD_MONEY:&#x3C;AMOUNT></code></td><td>Add money to player account</td></tr><tr><td><code>ADD_WALK_SPEED</code></td><td>Adds to the player's walk speed (from -1 to 1)</td></tr><tr><td><code>AIR:&#x3C;AMOUNT></code></td><td>Modify player's remaining air</td></tr><tr><td><code>AUTO_REEL</code></td><td>Auto reel in fish from fishing rod (for BITE_HOOK trigger only)</td></tr><tr><td><code>BLEED:&#x3C;DAMAGE>:&#x3C;TICKS>:&#x3C;INTERVAL_TICKS></code></td><td>Steal entity bleed</td></tr><tr><td><code>BLOOD</code></td><td>Display blood effect</td></tr><tr><td><code>BOOST:[DIRECTION]:[AMOUNT]</code></td><td>Boost entity up in air</td></tr><tr><td><code>BREAK_BLOCK</code></td><td>Break block</td></tr><tr><td><code>BREAK_TREE:[MAX_LOGS]:[MAX_LEAVES]</code></td><td>Break a whole tree at once</td></tr><tr><td><code>BURN:&#x3C;SECONDS></code></td><td>Set an entity on fire</td></tr><tr><td><code>CACTUS</code></td><td>Display cactus effect</td></tr><tr><td><code>CANCEL_EVENT</code></td><td>Cancel Event, e.g. an attack</td></tr><tr><td><code>CANCEL_USE:&#x3C;MATERIAL>:&#x3C;TICKS></code></td><td>Cancel use of a material, e.g. ENDER_PEARL</td></tr><tr><td><code>CONSOLE_COMMAND:&#x3C;COMMAND></code></td><td>Run command through console</td></tr><tr><td><code>CURE:&#x3C;POTION></code></td><td>Remove non-permanent potion effect</td></tr><tr><td><code>CURE_PERMANENT:&#x3C;POTION></code></td><td>Remove permanent potion effect</td></tr><tr><td><del><code>DAMAGE_ARMOR</code></del></td><td>Removed. Use <strong>ADD_DURABILITY_ARMOR</strong> effect</td></tr><tr><td><code>DECREASE_DAMAGE:&#x3C;AMOUNT></code></td><td>Decrease damage by percentage</td></tr><tr><td><code>DISABLE_ACTIVATION:&#x3C;NAME>:&#x3C;SECONDS></code></td><td>Disable activation for seconds</td></tr><tr><td><code>DISABLE_KNOCKBACK:&#x3C;TICKS></code></td><td>Disable entity's knockback for time</td></tr><tr><td><code>DISARM</code></td><td>Disarm Entity</td></tr><tr><td><code>DO_HARM:&#x3C;HEALTH></code></td><td>Harm an entity by doing health damage. This does not ignore armor and dealt damage may be reduced depending on armor</td></tr><tr><td><code>REMOVE_HEALTH:&#x3C;HEALTH></code></td><td>Take entity's health away, ignores armor and <strong>does not play damage animation for player</strong></td></tr><tr><td><code>REMOVE_HEALTH_DAMAGE:&#x3C;HEALTH></code></td><td>Take entity's health away, ignore armor <strong>play damage animation for player</strong></td></tr><tr><td><code>REMOVE_HEALTH_TOTEM</code></td><td>Remove health from an entity while allowing the use of totem, "%e:&#x3C;HEALTH>"</td></tr><tr><td><code>REMOVE_HEALTH_DAMAGE_TOTEM</code></td><td>Remove health from an entity with damage effect while allowing the use of totem, "%e:&#x3C;HEALTH>"</td></tr><tr><td><code>DOUBLE_DAMAGE</code></td><td>Double damage</td></tr><tr><td><code>DROP_HEAD</code></td><td>Drop player or mob head</td></tr><tr><td><code>EXP:&#x3C;AMOUNT></code></td><td>Drop Experience Orbs</td></tr><tr><td><code>EXPLODE:&#x3C;POWER>:&#x3C;FIRE (true/false)>:&#x3C;BREAK BLOCKS (true/false></code></td><td>Create an explosion</td></tr><tr><td><code>EXTINGUISH</code></td><td>Extinguish an entity</td></tr><tr><td><code>FIREBALL</code></td><td>Shoot a fireball</td></tr><tr><td><code>FIREWORK:[COLOR]:[FADE_COLOR]:[TYPE]:[POWER]:[TRAIL]:[FLICKER]</code></td><td>Spawns a firework. Examples:<br><code>- FIREWORK:RED:ORANGE:BALL:1:true:true</code><br><code>- FIREWORK:255,0,255:0,255,0:BURST:3:false:true</code><br></td></tr><tr><td><code>FLY:[TICKS]</code></td><td>Toggle player's flight</td></tr><tr><td><code>FLY_SPEED:&#x3C;SPEED></code></td><td>Sets the player's fly speed (from -1 to 1)</td></tr><tr><td><code>FREEZE:&#x3C;TICKS></code></td><td>Freeze Entity</td></tr><tr><td><code>GUARD:&#x3C;ENTITY>:&#x3C;SECONDS>:&#x3C;AMOUNT>:&#x3C;NAME>:&#x3C;SWITCH_ROLES></code></td><td>Spawn a guard to protect an entity. Use baby version of supported mobs by adding <code>BABY_</code> prefix to the type, e.g. <code>BABY_ZOMBIE</code>. <code>SWITCH_ROLES</code> is used to anger the guard at the target instead of protecting him</td></tr><tr><td><code>GIVE_ITEM:&#x3C;MATERIAL>:[AMOUNT]</code></td><td>Give items to user/location</td></tr><tr><td><code>HALF_DAMAGE</code></td><td>Half damage effect</td></tr><tr><td><code>IGNORE_ARMOR_DAMAGE</code></td><td>Cancel armor durability reduction</td></tr><tr><td><code>IGNORE_ARMOR_PROTECTION</code></td><td>Ignores armor damage reduction</td></tr><tr><td><code>INCREASE_DAMAGE:&#x3C;AMOUNT></code></td><td>Increase damage by percentage</td></tr><tr><td><code>INVINCIBLE</code></td><td>Toggle entity's invincibility</td></tr><tr><td><code>KILL</code></td><td>Kill an entity</td></tr><tr><td><code>KEEP_ON_DEATH</code></td><td>Keep item on death</td></tr><tr><td><code>LIGHTNING:[BOOLEAN]</code></td><td>Strike a lightning. Optional argument if true, will cause block damage and harm players around, if false, will only play a visual lightning effect. Default is true.</td></tr><tr><td><code>MESSAGE:&#x3C;TEXT></code></td><td>Send a message</td></tr><tr><td><code>MORE_DROPS:&#x3C;AMOUNT></code></td><td>Multiplies item drops by the value set in &#x3C;AMOUNT>. We recommend that you set a whitelist for materials, otherwhise this will multiply all drops (e.g. diamond_block) <a href="/pages/vAEQhw1xhRFhm7JrNlFO">Settings</a></td></tr><tr><td><code>NEGATE_DAMAGE:&#x3C;AMOUNT></code></td><td>Negate a specified amount of damage</td></tr><tr><td><code>PARTICLE:&#x3C;PARTICLE>:&#x3C;AMOUNT>:&#x3C;OFFSET></code></td><td>Play particles at a location <a href="https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html">ParticleEffectTypes</a></td></tr><tr><td><code>PARTICLE_LINE:&#x3C;PARTICLE>:&#x3C;AMOUNT>:&#x3C;POINTS></code></td><td>Play particles in straight line. Amount = number of particles in each point, Points = number of points between two locations that particles will be shown at.</td></tr><tr><td><code>PERMISSION:&#x3C;TEXT></code></td><td>Toggle player's permission</td></tr><tr><td><code>PLANT_SEEDS:&#x3C;RADIUS>:&#x3C;SEEDS></code></td><td>Plant seeds in radius. Seed types: SEEDS, POTATO, MELON, PUMPKIN, CARROT, BEETROOT, NETHER_WART</td></tr><tr><td><code>PLAYER_COMMAND:&#x3C;COMMAND></code></td><td>Run command through player</td></tr><tr><td><code>PLAY_SOUND:&#x3C;SOUND>:[PITCH]:[VOLUME]</code></td><td>Play sound for a specific player</td></tr><tr><td><code>PLAY_SOUND_OUTLOUD:&#x3C;SOUND>:[PITCH]:[VOLUME]</code></td><td>Play sound at a location</td></tr><tr><td><code>POTION:&#x3C;POTION>:&#x3C;LEVEL>:[TICKS]</code></td><td>Add potion effect <a href="https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html">PotionEffectTypes</a></td></tr><tr><td><code>POTION_OVERRIDE:&#x3C;POTION>:&#x3C;LEVEL>:[TICKS]</code></td><td>Force-add potion effect</td></tr><tr><td><code>PULL_AWAY:&#x3C;DISTANCE></code></td><td>Pull away an entity</td></tr><tr><td><code>PULL_CLOSER:&#x3C;AMOUNT></code></td><td>Pull an entity closer</td></tr><tr><td><code>PUMPKIN:&#x3C;TICKS></code></td><td>Put a pumpkin on entity's head</td></tr><tr><td><code>REMOVE_ARMOR:&#x3C;ARMOR TYPE></code></td><td>Remove a specific armor piece</td></tr><tr><td><code>REMOVE_RANDOM_ARMOR</code></td><td>Remove a random armor piece</td></tr><tr><td><code>REMOVE_MONEY:&#x3C;AMOUNT></code></td><td>Remove money from player account</td></tr><tr><td><code>REPAIR</code></td><td>Repair item</td></tr><tr><td><code>REVIVE</code></td><td>Revive an entity</td></tr><tr><td><code>SET_AIR:&#x3C;AMOUNT></code></td><td>Set player's remaining air</td></tr><tr><td><code>SET_BLOCK:&#x3C;MATERIAL></code></td><td>Set block to a type</td></tr><tr><td><code>SET_MAX_CATCH_TIME:&#x3C;TICKS></code></td><td>Set max. Time for fishing</td></tr><tr><td><code>SET_MIN_CATCH_TIME:&#x3C;TICKS></code></td><td>Set min. Time for fishing</td></tr><tr><td><code>SHUFFLE_HOTBAR</code></td><td>Shuffle player's hotbar</td></tr><tr><td><code>SMELT</code></td><td>Smelt drops</td></tr><tr><td><code>SNOWBLIND</code></td><td>Cancel Event, e.g. an attack</td></tr><tr><td><code>SPAWN_ARROWS</code></td><td>Spawn flood of arrows from above</td></tr><tr><td><code>SPAWN_BLOCKS:&#x3C;MATERIAL>:&#x3C;DAMAGE></code></td><td>Spawn falling blocks from above player and to cause damage</td></tr><tr><td><code>STEAL_EXP:&#x3C;AMOUNT></code></td><td>Steal EXP from one person for another</td></tr><tr><td><code>STEAL_HEALTH:&#x3C;HEALTH></code></td><td>Steal health from one entity for another</td></tr><tr><td><code>STEAL_MONEY:&#x3C;AMOUNT></code></td><td>Steal Money from one person for another</td></tr><tr><td><code>STOP_KNOCKBACK</code></td><td>Stop entity's knockback</td></tr><tr><td><code>SUBTITLE:&#x3C;TEXT></code></td><td>Send a subtitle</td></tr><tr><td><code>TAKE_AWAY:&#x3C;MATERIAL>:&#x3C;AMOUNT></code></td><td>Take item away from player</td></tr><tr><td><code>TELEPORT_BEHIND</code></td><td>Teleport behind other entity</td></tr><tr><td><code>TELEPORT</code></td><td>Teleport to location</td></tr><tr><td><code>TITLE:&#x3C;TEXT></code></td><td>Send a title</td></tr><tr><td><code>TNT:[DAMAGE]:[RADIUS]</code></td><td>Create a TNT explosion</td></tr><tr><td><code>TP_DROPS</code></td><td>Teleport drops to inventory</td></tr><tr><td><code>DELETE_ITEM:[amount]</code></td><td>Delete x amount of current item from inventory</td></tr><tr><td><code>SPAWN_ENTITY:&#x3C;TYPE></code></td><td>Spawn an entity at a location (req. EntityType)</td></tr><tr><td><code>PROJECTILE:&#x3C;TYPE></code></td><td>Spawn a shooting projectile with velocity (req. EntityType Projectile)</td></tr><tr><td><code>WEB_WALKER</code></td><td>Walk fast through cobwebs</td></tr><tr><td><code>LAVA_WALKER</code></td><td>Walk on lava</td></tr><tr><td><code>WATER_WALKER</code></td><td>Walk on water</td></tr><tr><td><code>WALK_SPEED:&#x3C;SPEED></code></td><td>Sets the player's fly speed (from -1 to 1)</td></tr><tr><td><code>OPEN_CRAFTING_TABLE</code></td><td>Open a virtual crafting table</td></tr><tr><td><code>OPEN_ENDERCHEST</code></td><td>Open virtual enderchest</td></tr><tr><td><code>DROP_HELD_ITEM</code></td><td>Drop item in hand</td></tr><tr><td><code>INVERT_VARIABLE:&#x3C;NAME></code></td><td>Invert a custom variable's boolean.</td></tr><tr><td><code>SET_VARIABLE:&#x3C;NAME>&#x3C;VALUE></code></td><td>Create a custom variable globally, not per user. To create a variable that could be user for a user, you can include user's name in the variable's name, e.g. <code>customVar%attacker name%.</code> <a href="/pages/FrvcHUE847BUM1zWFRjp">Read more here.</a></td></tr><tr><td><code>SCREEN_FREEZE:&#x3C;ticks></code></td><td>Slow player down and show freeze effect on player's screen for defined amount of ticks (1 second = 20 ticks!)</td></tr><tr><td><code>WAIT:&#x3C;ticks></code></td><td>Wait for the next effect to activate.</td></tr><tr><td></td><td></td></tr></tbody></table>

## Plugin-specific effects

### <mark style="color:purple;">AdvancedEnchantments</mark>:

| Usage                         | Description               |
| ----------------------------- | ------------------------- |
| `ADD_ENCHANT:<ENCHANT>:<LVL>` | Add an enchant to item    |
| `REMOVE_ENCHANT:<ENCHANT>`    | Remove enchant from item  |
| `ADD_SOULS:<amount>`          | Add souls to an item      |
| `REMOVE_SOULS:<amount>`       | Remove souls from an item |

### McMMO:

<table><thead><tr><th>Usage</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>ADD_EXP_MCMMO:&#x3C;SKILL>:&#x3C;AMOUNT>
</code></pre></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td>Add mcmmo skill experience</td></tr></tbody></table>


# Triggers

Triggers are the events that will activate an ability. Examples of triggers include a player attacking another player, a mob taking damage, they can be environmental events, or a block being broken. Triggers can also have their own parameters, such as a specific type of damage or a certain block material.

Triggers are events that activate abilities in the system. When a trigger occurs, the system checks for any abilities that are set to activate on that trigger and performs the corresponding effects.

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>

### External Triggers

Here are the external triggers, which depend on other plugins or systems to work

<table data-full-width="true"><thead><tr><th width="243">Name</th><th width="307.3333333333333">Description</th><th>For plugin</th></tr></thead><tbody><tr><td>CUSTOM_MOB_DEFENSE</td><td>Activates when a custom mob is hit</td><td>AdvancedMobs</td></tr></tbody></table>

### Internal Triggers

Here is a list of all the default available triggers, along with a brief description of each:

{% hint style="info" %}
**MINING**, **ATTACK** and **ATTACK\_MOB** triggers do not work with off-hand items.
{% endhint %}

<table data-full-width="true"><thead><tr><th width="291.5">Name</th><th>Description</th></tr></thead><tbody><tr><td>ATTACK</td><td>Activates when a player/mob hits a player</td></tr><tr><td>ATTACK_MOB</td><td>Activates when a player/mob hits a mob</td></tr><tr><td>ARROW_HIT</td><td>Activates when an arrow hits an entity</td></tr><tr><td>BOW_FIRE</td><td>Activates when a bow is fired full power</td></tr><tr><td>BITE_HOOK</td><td>Activates when fish bites fishing hook (or item gets caught on it)</td></tr><tr><td>BREW_POTION</td><td>Activates when player brews a potion (variables: %potion type%, %is extended%, %is upgraded%)</td></tr><tr><td>CATCH_FISH</td><td>Activates when a player catches a fish (does not activate with entities)</td></tr><tr><td>COMMAND</td><td>Activates when player runs a command. Specify a command at the same block as chances, cooldowns are set, example here:<br><code>chance: 100</code><br><code>cooldown: 0</code><br><code>command: exampleCommand</code></td></tr><tr><td>HOOK_ENTITY</td><td>Activates when player hooks an entity with a fishing rod</td></tr><tr><td>DEATH</td><td>Activates when a player or mob dies</td></tr><tr><td>DEFENSE</td><td>Activates when a player/mob is hit by a player</td></tr><tr><td>DEFENSE_MOB</td><td>Activates when a player/mob is hit by a mob</td></tr><tr><td>DEFENSE_MOB_PROJECTILE</td><td>Activates when a player/mob is hit by a projectile from a mob</td></tr><tr><td>DEFENSE_PROJECTILE</td><td>Activates when a player/mob is hit by a projectile from a player</td></tr><tr><td>EAT</td><td>Activates when a player eats</td></tr><tr><td>ELYTRA_FLY</td><td>Activates when an entity starts flying with an elytra</td></tr><tr><td>EXPLOSION</td><td>Activates when an entity takes explosion damage</td></tr><tr><td>FALL_DAMAGE</td><td>Activates when an entity takes fall damage</td></tr><tr><td>ELYTRA_FLY_DAMAGE</td><td>Activates when entity takes damage while flying with elytra</td></tr><tr><td>FIRE</td><td>Activates when an entity takes fire damage</td></tr><tr><td>HELD</td><td>Activates when player holds an item</td></tr><tr><td>ITEM_BREAK</td><td>Activates when a player breaks an item</td></tr><tr><td>JUMP</td><td>Activates when a player jumps</td></tr><tr><td>JOIN</td><td>Activates when any player joins (on all items)</td></tr><tr><td>QUIT</td><td>Activates when any player leaves (on all items)</td></tr><tr><td>KILL</td><td>Activates when any entity kills another entity</td></tr><tr><td>KILL_MOB</td><td>Activates when any entity kills a mob</td></tr><tr><td>KILL_PLAYER</td><td>Activates when any entity kills a player</td></tr><tr><td>MINING</td><td>Activates when a block is broken</td></tr><tr><td>PASSIVE_DEATH</td><td>Activates when an entity is struck by lightning</td></tr><tr><td>RIGHT_CLICK</td><td>Activates when a player right clicks blocks, air</td></tr><tr><td>RIGHT_CLICK_ENTITY</td><td>Activates when player right clicks entity</td></tr><tr><td>ROD_CAST</td><td>Activates when a player casts their fishing rod</td></tr><tr><td>SHOOT</td><td>Activates when a player/mob shoots a player</td></tr><tr><td>SHOOT_MOB</td><td>Activates when a player/mob shoots a mob</td></tr><tr><td>SWING</td><td>Activates when a player swings their held item</td></tr><tr><td>SHIELD_BLOCK</td><td>Activates when a player blocks with a shield</td></tr><tr><td>HORN</td><td>Activates when player blows a horn</td></tr><tr><td>EFFECT_STATIC</td><td>Activates when a player equips or unequips armor</td></tr><tr><td>REPEATING</td><td>Repeatingly activates effects. Must set <code>time</code>settings in the same block as effects list. If you don't wish the effect to apply immediately, you must set <code>instantApply</code> setting to <code>false</code> in the same block as effects list. That will respect the <code>time</code> setting for apply delay.</td></tr></tbody></table>


# Targets

Targets are the entities or blocks that will be affected by an ability. Examples of targets include the player using the ability, the victim of an attack, or a block that has been broken.

Here are some examples of targets:

* `@Victim`: Applies the effect to the victim of an event (such as an attack).
* `@Attacker`: Applies the effect to the attacker of an event (such as an attack).
* `@Block`: Applies the effect to the block that was interacted with (such as right-clicking).
* `@NearestPlayer{radius=0}`: Applies the effect to the nearest player within the specified radius.

You can use multiple targets in a single effect, separated by a space. For example:\
`@Victim @Attacker` would apply the effect to both the victim and the attacker of an event.

### Target Configuration

Targets can be configured with additional options. For example, you can use the `radius` option to specify the radius around a target to search for another target.

Here's an example of a target configuration using the `radius` option:

```yaml
effects:
- 'MESSAGE:you are the nearest player! @NearestPlayer{radius=10}'
```

This would apply the effect to the nearest player within a radius of 10 blocks.

### Target Reference Table

Here is a table of all available targets, along with their descriptions:

| Name                                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@Victim`                                                                         | Applies the effect to the victim of an event (such as an attack).                                                                                                                                                                                                                                                                                                                                                             |
| `@Attacker`                                                                       | Applies the effect to the attacker of an event (such as an attack).                                                                                                                                                                                                                                                                                                                                                           |
| `@Self`                                                                           | Applies the effect to main entity (who activated it)                                                                                                                                                                                                                                                                                                                                                                          |
| `@Block`                                                                          | Applies the effect to the block that was interacted with (such as right-clicking).                                                                                                                                                                                                                                                                                                                                            |
| `@NearestPlayer{radius=0}`                                                        | Applies the effect to the nearest player within the specified radius.                                                                                                                                                                                                                                                                                                                                                         |
| `@EyeHeight`                                                                      | Applies the effect at entity's eye location                                                                                                                                                                                                                                                                                                                                                                                   |
| <p><code>@Trench{radius=0}</code><br><code>@Trench{radiuscustom=0x0x0}</code></p> | <p>Applies effect in square (e.g. 3x3x3) size area (commonly used for Trench). Only odd numbers allowed (e.g. 3, 5, 7, 9 etc..)<br><br>Use <code>{ignoretool=true}</code> to allow trench with tools which are not allowed to break blocks with. E.g. shovel on cobblestone</p>                                                                                                                                               |
| `@Tunnel{radiuscustom=1x3x5,mode=UP}`                                             | Applies effects in tunnels and staircases areas. Available Modes: `UP, DOWN, STRAIGHT, AUTO`. Works very similarly to the Trench target and shares the same arguments.                                                                                                                                                                                                                                                        |
| `@BlockInDistance{distance=1}`                                                    | Gets block within distance (closest one or the furthest away location if no block is within distance)                                                                                                                                                                                                                                                                                                                         |
| `@Veinmine{depth=75}`                                                             | <p>Vein mine blocks. You must define whitelist of materials in <code>settings.whitelist</code> in the same block as chance, cooldown, etc.. <a href="https://pastebin.com/raw/fFZGUfD1">Example here.</a><br>Default depth is 75</p>                                                                                                                                                                                          |
| `@Add{x=0.0,y=0.0,z=0.0}`                                                         | Add distance to main entity's location                                                                                                                                                                                                                                                                                                                                                                                        |
| `@Aoe{radius=1,target=all}`                                                       | <p>Area of effect target. Radius is in what radius around a location entities are searched for. Targets are:<br>- ALL<br>- MOBS<br>- DAMAGEABLE (all entities that can damaged by user)<br>- UNDAMAGEABLE (all entities that can't be harmed by user, e.g. allies)<br>--------------------------------------------<br>You can also define a limit for number of entities affected adding option e.g. <code>limit=1</code></p> |
| `@EntityInSight{distance=20,angle=40,limit=5,target=ALL}`                         | Target entities in sight, specify max distance, limit of entities, targets and angle of vision for targeted entities.                                                                                                                                                                                                                                                                                                         |
| `@AllPlayers`                                                                     | All players on the server                                                                                                                                                                                                                                                                                                                                                                                                     |

You can use aliases for parameters, which are more concise.

<table data-full-width="false"><thead><tr><th>Name</th><th>Alias</th><th data-hidden></th></tr></thead><tbody><tr><td>ignoretool</td><td>it</td><td></td></tr><tr><td>radius</td><td>r</td><td></td></tr><tr><td>radiuscustom</td><td>rc</td><td></td></tr><tr><td>target</td><td>t</td><td></td></tr><tr><td>limit</td><td>p</td><td></td></tr><tr><td>distance</td><td>d</td><td></td></tr><tr><td>depth</td><td>dp</td><td></td></tr><tr><td>points</td><td>p</td><td></td></tr><tr><td>angle</td><td>a</td><td></td></tr></tbody></table>


# Conditions

Learn how to activate abilities depending on set conditions.

Conditions let you choose under what circumstances enchantment should be activated/stopped or chance of activation increased/decreased.

### **3 Conditions Elements**

1. Dynamic Variable ([Find all variables here](/abilities/conditions/conditions-variables))
2. Expected result
3. Outcome

### How do Conditions work

Conditions work by comparing dynamic variables with your expected result. If variable's result matches your result, then the outcome will be taken into consideration.

### Examples of Conditions

Following condition will not activate effects if player's health is higher than 5 points (2.5 hearts):

`%victim health% > 5 : %stop%`\
\| **Dynamic Variable** | **Expected Result** | **Outcome** |

Next condition will only allow enchantment to work if player is in a world called `my_world`:

`%player world% = my_world : %allow%`

Final example is a bit more complex, it combines multiple conditions. If player's Y level is less than 30 and health is more than 5 hearts, it will increase chance of effects activating by 10:

`%player y% < 30 && %player health% > 10 = : %chance%+10`

### Nested conditions

Nested Conditions enhance the flexibility of enchantment conditions by allowing complex logical groupings. This feature introduces parentheses () to combine multiple checks, enabling more sophisticated decision-making. For example:

`(%victim max health% > 20 AND %victim world% != dungeon) OR %victim world% = prison : %allow%`

This condition will activate if either: the victim has over 20 health and is not in the dungeon world, or if the victim is in the prison world. Nested conditions support AND, OR operators, and can be used to create intricate, multi-layered logic for enchantment activation.


# Conditions Variables

Dynamic variables to be used in conditions and abilities.

Conditions can be targeted against different entities. You can use **attacker** or **victim** instead of **player**, for example: `%player health%` -> `%victim health%`.

### List of built-in variables

{% hint style="info" %}
All variables can start with 'player', 'attacker', and 'victim'\
Example: '%victim is on fire%'
{% endhint %}

{% hint style="info" %}
Parsing for attacker or victim works for placeholders from PlaceholderAPI as well.\
Example: "%victim checkitem\_getinfo:39\_mat:%"
{% endhint %}

#### Player only variables

<table data-header-hidden><thead><tr><th>Variable</th><th width="300">Description</th></tr></thead><tbody><tr><td>Variable</td><td>Description</td></tr><tr><td>%can break%</td><td>True if a player can break the block</td></tr><tr><td>%faction land%</td><td>Gets faction land player is in.</td></tr><tr><td>%food%</td><td>Food level of player</td></tr><tr><td>%is bleeding%</td><td>True if the player is bleeding via McMMO</td></tr><tr><td>%helmet%</td><td>Equipped Helmet</td></tr><tr><td>%chestplate%</td><td>Equipped Chestplate</td></tr><tr><td>%leggings%</td><td>Equipped Leggings</td></tr><tr><td>%boots%</td><td>Equipped Boots</td></tr><tr><td>%is blocking%</td><td>True if the player is blocking</td></tr><tr><td>%is flying%</td><td>True if the player is flying</td></tr><tr><td>%is sneaking%</td><td>True if the player is sneaking</td></tr><tr><td>%level of skill &#x3C;skill>%</td><td>Level of a player's McMMO skill</td></tr><tr><td>%permissions%</td><td>All player's permissions</td></tr><tr><td>%is op%</td><td>True if player has OP</td></tr></tbody></table>

#### Global Variables

| Variable                                               | Description                                                                                                                                                        |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| %block below%                                          | Block type player/ mob is standing on                                                                                                                              |
| %trigger type%                                         | Type of trigger                                                                                                                                                    |
| %combo%                                                | Current combo                                                                                                                                                      |
| %custom name%                                          | Custom name of player/ mob                                                                                                                                         |
| %has enchantment in hand of \<enchant>%                | Whether player/ mob has an enchantment on the item in its main hand                                                                                                |
| %has enchantment in hand of \<enchant> level \<level>% | Whether player/ mob has an enchantment of a specific level on the item in its main hand                                                                            |
| %has enchantment in \<armor slot> of \<enchantment>%   | Whether player/ mob has an enchantment on the item in a specific armor slot                                                                                        |
| %has potion effect \<effect>%                          | <p>Whether player/ mob has a potion effect<br><a href="https://helpch.at/docs/1.12.2/index.html?org/bukkit/potion/PotionEffectType.html">PotionEffectTypes</a></p> |
| %item in hand level \<enhantment>%                     | Level of enchantment on item in main hand                                                                                                                          |
| %health%                                               | The health of player/ mob                                                                                                                                          |
| %health percentage%                                    | Percentage of health left                                                                                                                                          |
| %is critical%                                          | Whether attack was a critical hit                                                                                                                                  |
| %is gliding%                                           | Whether player/ mob is gliding                                                                                                                                     |
| %is sprinting%                                         | Whether player is sprinting                                                                                                                                        |
| %is crouching%                                         | Whether player/ mob is crouching                                                                                                                                   |
| %is holding%                                           | Type of item currently held by player/ mob                                                                                                                         |
| %is hostile%                                           | Whether mob is hostile                                                                                                                                             |
| %is damageable%                                        | Whether the player/mob can be damaged                                                                                                                              |
| %is on fire%                                           | Whether player/ mob is on fire                                                                                                                                     |
| %is removal%                                           | Whether effect is removal (EFFECT\_STATIC, HELD, SHIFT, SPRINT)                                                                                                    |
| %is under water%                                       | Whether player/ mob is underwater                                                                                                                                  |
| %item slot%                                            | Slot of item that triggered enchant                                                                                                                                |
| %max health%                                           | Maximum health of player/ mob                                                                                                                                      |
| %mob type%                                             | Type of mob                                                                                                                                                        |
| %name%                                                 | Name of player/ mob                                                                                                                                                |
| %nearby mobs%                                          | Amount of mobs in a 10 block radius                                                                                                                                |
| %offhand item%                                         | Type of item currently held in offhand by player/ mob                                                                                                              |
| %players%                                              | Amount of players in a 10 block radius                                                                                                                             |
| %potion effect level \<effect> \<level>%               | Whether player/ mob has a potion effect of a specifc level                                                                                                         |
| %time%                                                 | Time of the world                                                                                                                                                  |
| %x%                                                    | X coordinate of player/ mob                                                                                                                                        |
| %y%                                                    | Y coordinate of player/ mob                                                                                                                                        |
| %z%                                                    | Z coordinate of player/ mob                                                                                                                                        |
| %x double%                                             | More precise X coordinate of player/ mob                                                                                                                           |
| %y double%                                             | More precise Y coordinate of player/ mob                                                                                                                           |
| %z double%                                             | More precise Z coordinate of player/ mob                                                                                                                           |
| %block tags%                                           | Array of tags a target block has                                                                                                                                   |
| %is riding%                                            | Whether player/mob is riding player/mob (or is a passenger)                                                                                                        |
| %passengers%                                           | Passengers of the player/mob                                                                                                                                       |
| %yaw%                                                  | Yaw of the player/mob                                                                                                                                              |
| %pitch%                                                | Pitch of the player/mob                                                                                                                                            |

#### Type-specific variables (global)

| Variable               | Description                                        | Applicable Type(s)                                     |
| ---------------------- | -------------------------------------------------- | ------------------------------------------------------ |
| %is headshot%          | Whether an arrow/ trident hit was a headshot       | BOW, BOW\_MOB, DEFENSE\_BOW, DEFENSE\_BOW\_MOB         |
| %force%                | Force of bow when firing arrow                     | BOW\_FIRE                                              |
| %damaged from behind%  | If victim was damaged from behind by enemy         | DEFENSE, DEFENSE\_MOB, DEFENSE\_BOW, DEFENSE\_BOW\_MOB |
| %projectile type%      | Type of projectile ("arrow" or "trident")          | BOW, BOW\_MOB, DEFENSE\_BOW, DEFENSE\_BOW\_MOB         |
| %exp%                  | Amount of EXP to give/ drop                        | CATCH\_FISH, FISHING, KILL\_MOB                        |
| %caught%               | Type of item player caught                         | CATCH\_FISH, FISHING                                   |
| %maximum durability%   | Maximum durability of item                         | ITEM\_BREAK                                            |
| %block x%              | X coordinate of block broken                       | MINING                                                 |
| %block y%              | Y coordinate of block broken                       | MINING                                                 |
| %block z%              | Z coordinate of block broken                       | MINING                                                 |
| %block type%           | Type of block                                      | MINING, SWING                                          |
| %block type lowercase% | Type of block but all letters are lowercase        | MINING                                                 |
| %block drop type%      | Type of item block will drop                       | MINING                                                 |
| %is crop%              | Whether broken block was a crop                    | MINING                                                 |
| %is fully grown%       | Whether broken crop was fully grown                | MINING                                                 |
| %block location%       | Location of the block (used in location parameter) | MINING, SWING                                          |
| %damage%               | Final damage                                       | Any type triggered by damage or an attack              |
| %raw damage%           | Damage before armor                                | Any type triggered by damage or an attack              |
| %damage cause%         | Cause of damage                                    | Any type triggered by damage or an attack              |

### PlaceholderAPI support

E.g: `%victim player_level% > 10 : %stop%`, `player_level` is a PlaceholderAPI placeholder `%player_level%`.

You can use `%player %`, `%attacker %` or`%victim %`

It's a must to remove percentage signs from PlaceholderAPI placeholders, more examples: `%server_online% -> server_online` -> `%player server_online% > 5 : %allow%`


# Condition Comparison

Available methods of comparing between variables and your expected result:

<table data-header-hidden data-full-width="true"><thead><tr><th width="161.33333333333331">Comparison</th><th width="244">Explanation</th><th>Example</th></tr></thead><tbody><tr><td>=</td><td>Equals to</td><td>%player world% <em>=</em> wor<strong>l</strong>d</td></tr><tr><td>&#x3C;</td><td>Less than</td><td>%player y% <em>&#x3C;</em> <strong>20</strong></td></tr><tr><td>&#x3C;=</td><td>Less than or equals to</td><td>%player y% <em>&#x3C;=</em> <strong>22</strong></td></tr><tr><td>></td><td>More than</td><td>%player y% <em>></em> <strong>20</strong></td></tr><tr><td>>=</td><td>More than or equals to</td><td>%player y% <em>>=</em> <strong>20</strong></td></tr><tr><td>contains</td><td>Variable contains string</td><td>%player world% <em>contains</em> <strong>nether</strong></td></tr><tr><td>matchesregex</td><td>Variable matches RegEx</td><td>%player name% <em>matchesregex</em> <code>^.\w+</code> (name starts with a dot)</td></tr></tbody></table>


# Condition outcome

| Outcome    | Description                                                 |
| ---------- | ----------------------------------------------------------- |
| %force%    | Force ability to activate, ignoring cooldown and chacnes    |
| %allow%    | Allow ability to activate, not ignoring cooldown or chances |
| %continue% | Continue to next condition                                  |
| %stop%     | Stop ability's activation                                   |
| %chance%+x | Add chance to ability's activation (e.g. `%chance%+5`)      |
| %chance%-5 | Remove chance from ability's activation                     |


# Multiple Conditions

You can make multiple condition lines, and have different comparisons and outcomes for each one.\
Example:

```yaml
conditions:
  - '%attacker health% <= 5 : %allow%'
  - '%victim health% >= 15 : %allow%'
effects:
  - 'INCREASE_DAMAGE:100'
```

You can make conditions even more advanced by having multiple different types of conditions on one line.\
Use `&&` to make combine two conditions on one line and require both of them to be fit the comparison for your outcome to happen.\
Additionally, you can use `OR` to make at least one of these conditions fit for it to parse.\
Examples:

<pre class="language-yaml"><code class="lang-yaml"><strong>conditions:
</strong>  - '%attacker health% &#x3C;= 5 &#x26;&#x26; %victim health% >= 15 : %allow%'
effects:
  - 'INCREASE_DAMAGE:100'
</code></pre>

```yaml
conditions:
  - '%mob type% = RAVAGER OR %mob type% = POLAR_BEAR : %allow%'
effects:
  - 'INCREASE_DAMAGE:<random number>5-15</random number> %attacker%'
```

You can have up to as many of these in a line as you want, for example:

```yaml
conditions:
  - '%mob type% = SKELETON : %allow% OR %mob type% = ZOMBIE : %allow% OR %mob type% = ZOMBIE_VILLAGER : %allow% OR %mob type% = WITHER : %allow% OR %mob type% = WITHER_SKELETON : %allow% OR %mob type% = ZOMBIFIED_PIGLIN : %allow% OR %mob type% = SKELETON_HORSE : %allow% OR %mob type% = ZOMBIE_HORSE : %allow% OR %mob type% = STRAY : %allow% OR %mob type% = HUSK : %allow% OR %mob type% = PHANTOM : %allow% OR %mob type% = DROWNED : %allow% OR %mob type% = ZOGLIN : %allow%
effects:
  - 'ADD_HARM:<math>%level%*1.5</math> %victim%'
```


# Settings

Settings are values you can set for each ability. Be it world whitelist, whitelist/blacklist for materials and more.

## Examples

Example for ability to Veinmine blocks

{% code lineNumbers="true" fullWidth="false" %}

```yaml
  levels:
    '1':
      chance: 15
      cooldown: 4
      settings:
        whitelist:
          - "COAL_ORE"
          - "COPPER_ORE"
          - "IRON_ORE"
          - "GOLD_ORE"
          - "LAPIS_ORE"
          - "REDSTONE_ORE"
          - "DIAMOND_ORE"
          - "EMERALD_ORE"
          - "NETHER_QUARTZ_ORE"
          - "NETHER_GOLD_ORE"
          - "ANCIENT_DEBRIS"
          - "DEEPSLATE_COAL_ORE"
          - "DEEPSLATE_COPPER_ORE"
          - "DEEPSLATE_IRON_ORE"
          - "DEEPSLATE_GOLD_ORE"
          - "DEEPSLATE_LAPIS_ORE"
          - "DEEPSLATE_REDSTONE_ORE"
          - "DEEPSLATE_DIAMOND_ORE"
          - "DEEPSLATE_EMERALD_ORE"
      effects:
        - 'BREAK_BLOCK @Veinmine'
```

{% endcode %}

## Important for AdvancedEnchantments

Settings must be set for each level, not for whole enchant.

## Setting reference table

| Setting        | Description                                                                          |
| -------------- | ------------------------------------------------------------------------------------ |
| worldBlacklist | List of worlds where this ability is blacklisted and won't activate. Case sensitive. |
| blacklist      | Material blacklist (works with certain effects only)                                 |
| whitelist      | Material whitelist(works with certain effects only)                                  |


# Functions

Functions are tags which can be used in effect lines to make them more dynamic. They are written in `<>` brackets and are used instead of a value for the effect.

Here is a list of available functions:

### `<chance>`

Sets a chance for this effect line to activate. The number inside the brackets is the percentage chance of the effect activating.

Example:

```yaml
effects:
- 'INCREASE_DAMAGE:5 <chance>50</chance>'
```

This will cause the entity to take 5% more damage 50% of the time.

### `<condition>`

Use in-line conditions for effects. Extremely handly to create dynamic mechanics.

Example:

```yaml
effects:
- 'ADD_HEALTH:5 <condition>%victim health% < 10 : %allow%</condition>'
```

This would add 2.5 hearts to victim's health if they had less than 5 hearts remaining.

### `<math>`

Performs a math operation using variables or numbers. The operation is written inside the brackets.

Example:

```yaml
effects:
- 'EXP:<math>%exp% * 2</math>'
```

This will drop double the amount of experience from event.

### `<random number>`

Picks a random number between two values. The values are written inside the brackets and separated by a dash `-`.

Example:

```yaml
effects:
- 'INCREASE_DAMAGE:<random number>1-5</random number>'
```

This will increase the damage to a random amount between 1 and 5.

### `<random word>`

Picks a random word from a list. The words are written inside the brackets and separated by a comma `,`.

Example:

```yaml
effects:
- 'MESSAGE:<random word>Hello,Goodbye,Hi</random word>'
```

This will send a message with a random word from the list.

### `<round>`

Rounds a number to the nearest whole number. The number is written inside the brackets.

Example:

```yaml
effects:
- 'EXP:<round><math>%exp% * 2.5</math></round>'
```

This will give the entity an amount of experience that is 2.5 times their current amount, rounded to the nearest whole number.

### **`<int>`**

Converts a floating-point number to an integer by removing any fractional parts. The number to be converted is written inside the brackets.

**Example:**

`effects:`

* `'EXP:<int><math>%exp% * 1.5</math></int>'`

In this example, if the entity has an experience value (`%exp%`), multiplying it by 1.5 might result in a floating-point number. The `<int></int>` tags ensure that the final experience value given to the entity is an integer by removing any decimals.

### **`<scramble>`**

Randomly rearranges the characters within the text placed inside the brackets. This can be used to create scrambled text effects.

**Example:**

`effects:`

* `'Message:<scramble>Welcome!</scramble>'`

In this example, the text "Welcome" will be scrambled into a random arrangement, such as "cme!lWe!" (Note: The actual scrambled output will vary each time it's generated.)


# Scripting

Learn how to script with Abilities

With new abilities v2, we've added scripting support for effects. Variables are are reset with server restarts.

## `SET_VARIABLE:<NAME><VALUE>`

Create a custom variable globally, not per user. To create a variable that could be user for a user, you can include user's name in the variable's name, e.g. `customVar%attacker name%`

## `INVERT_VARIABLE:<NAME>`

Invert a custom variable's boolean. If no variable was set before, it will default to `false`

## Use variable in effects and conditions

Due to nature of these variables and naming, you can create global or per-player variables. To use them in effects and conditions, add a `%custom_` prefix and then name your variable.

### Global variables

E.g. if we create a variable:

```yaml
SET_VARIABLE:myVariable:awesome
```

We can use this variable in effects later like this:

```
MESSAGE:You are %custom_myVariable%
```

This would send a message to the player `You are awesome`.

### Per-player variables

Creating per-player variables is still as simple and easy! Just include the player name variable inside the variable's name, e.g.:

```
SET_VARIABLE:customValue%attacker name%:50
```

Then later we can retrieve it in a message like this as well:

```
MESSAGE:I have %custom_customValue%attacker name%% dollars
```

This would message `I have 50 dollars`

### Conditions

It works the same, but an example would be:

```
conditions:
  - '%custom_customValue%attacker name%% = 50 %allow%'
```

### Null / Unitialized variables

If an attempt is made to retrieve a variable which doesn't exist, default value will be `0`

## Examples

In this example, we use RIGHT\_CLICK trigger to count how many times user right clicks. If they click more than 5 times, they will not be able to activate the message again.

{% code lineNumbers="true" %}

```yaml
RIGHT_CLICK:
  conditions:
    - '%custom_nameof%attacker name%% = 5 : %stop%'
  effects:
    - 'SET_VARIABLE:clicks%attacker name%:<math>%custom_clicks%attacker name%%+1</math>'
    - 'MESSAGE:You clicked %custom_clicks%attacker name%% times'
```

{% endcode %}


# Variables

Variables are placeholders for dynamic data in Ability configurations. They allow for more flexibility and customization in Abilities.

### Usage

To use a variable, simply include it in an Ability configuration with the `%` symbol surrounding it. For example:

```yaml
effects:
- "MESSAGE: The attacker's name is %attacker name%"
```

### Available Variables

| VARIABLE                                      | DESCRIPTION                                                                                                                                             |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `%attacker name%`                             | The name of the entity that initiated an Ability.                                                                                                       |
| `%victim name%`                               | The name of the entity that was targeted by an Ability.                                                                                                 |
| `%block type%`                                | The type of the block that was targeted by an Ability.                                                                                                  |
| `%system time%`                               | The current system time, in milliseconds.                                                                                                               |
| `%exp%`                                       | Amount of exp that was dropped in trigger event                                                                                                         |
| `%player name%`                               | Main entity's name                                                                                                                                      |
| `%damage%`                                    | Damage dealt (after armor etc)                                                                                                                          |
| `%raw damage%`                                | Raw damage dealt (before armor etc)                                                                                                                     |
| `%damage cause%`                              | Cause of damage                                                                                                                                         |
| `%random%`                                    | Last \<random> number                                                                                                                                   |
| `%is removed%`                                | Whether the effect is being removed. Is used mostly on triggers like EFFECT\_STATIC, HELD etc.                                                          |
| `%client version%`                            | Returns client's protocol version. Find all versions here: <https://wiki.vg/Protocol_version_numbers>                                                   |
| `%potion type%, %is extended%, %is upgraded%` | From BREW\_POTION trigger, passes data on potion. Potion types: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html>      |
| `%block is interactable%`                     | Whether the block is interactable or not from [bukkit api](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/BlockType.html#isInteractable\(\)) |

## Plugin-specific variables:

### AdvancedEnchantments:

| VARIABLE          | DESCRIPTION             |
| ----------------- | ----------------------- |
| `%level%`         | Level of enchantment    |
| `%souls on item%` | Amount of souls in item |


# Pointers

**Pointers** are a new mechanic introduced in AdvancedEnchantments to specify the event or situation under which an effect is activated or applied. They are concise, easy to read, and help in providing context to the enchantment effects.

{% hint style="info" %}
Pointers will still obey triggers set by your ability. Meaning you cannot add additional triggers to your abilities with just pointers.
{% endhint %}

### Overview

A pointer is a short string prefixed by `~`. It indicates when an effect should be activated. For instance, `~ATTACK` signifies the effect is activated during an attack. Negative pointers, prefixed by `~!`, indicate when an effect should NOT be activated. For example, `~!ATTACK` implies the effect is not to be activated during an attack.

### Usage

To use a pointer, append it to the effect line in the enchantment definition. Here are some examples:

```graphql
DECREASE_DAMAGE:40 @Attacker ~DEFENSE
```

Multiple pointers can be combined for more complex conditions:

```graphql
EFFECT_NAME ~ATTACK ~!DEFENSE
```

This would mean the effect is activated during an attack but not during defense.

### Conclusion

Pointers provide a powerful and flexible way to specify the context under which enchantment effects are activated. They streamline enchantment definitions and make them more readable and intuitive for users. By adopting pointers, enchantment designers have a more granular control over when and how their effects are triggered.


# Skills

Coming soon.

Set up pre-made skills to be used in effects, instead of having to declare each time. They will have dynamic variables and could be used like this:

{% code lineNumbers="true" %}

```yaml
effects:
  - 'SKILL:extremeDamage[damage=2]'
```

{% endcode %}

And in skills.yml file, you would be define a skill like this:

<pre class="language-yaml" data-overflow="wrap" data-line-numbers><code class="lang-yaml"><strong>skills:
</strong>  extremeDamage:
    effects:
    - 'DO_HARM:[damage] @Victim'
    - 'LIGHTNING @Victim'
    - 'MESSAGE:&#x26;cYou were hit with &#x26;lextreme damage&#x26;c! @Victim'
</code></pre>


# Install Custom UIs

A detailed step-by-step guide on how to install custom UIs made for our plugins with ItemsAdder or Oraxen.

<mark style="color:yellow;">You must have</mark> [<mark style="color:yellow;">**ItemsAdder**</mark>](https://www.spigotmc.org/resources/%E2%9C%A8itemsadder%E2%AD%90emotes-mobs-items-armors-hud-gui-emojis-blocks-wings-hats-liquids.73355/) <mark style="color:yellow;">**or**</mark> [<mark style="color:yellow;">**Oraxen**</mark> ](https://www.spigotmc.org/resources/%E2%98%84%EF%B8%8F-oraxen-custom-items-blocks-emotes-furniture-resourcepack-and-gui-1-18-1-21-4.72448/)<mark style="color:yellow;">installed and working properly before proceeding with these steps.</mark>

## Available UIs

Currently, 4 UI packs are available for our plugins:

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Immersive BattlePass UI</strong></td><td>Immersive new drag &#x26; drop UI graphics solution for BattlePass plugin</td><td><a href="/files/wA83DXQUF74vK051KB2C">/files/wA83DXQUF74vK051KB2C</a></td><td><a href="https://advancedplugins.net/item/110">https://advancedplugins.net/item/110</a></td></tr><tr><td><strong>AdvancedEnchantments UI</strong></td><td>Amaze and surprise your server players with new immersive experience</td><td><a href="/files/YpaBjqqtf89I7nagiQkH">/files/YpaBjqqtf89I7nagiQkH</a></td><td><a href="https://advancedplugins.net/item/AdvancedEnchantments-UI.123">https://advancedplugins.net/item/AdvancedEnchantments-UI.123</a></td></tr><tr><td><strong>AdvancedPets UI</strong></td><td>Complete the full unique experience of custom pets with this immersive UI upgrade</td><td><a href="/files/3aXleo64ZRuC0bwl3hYb">/files/3aXleo64ZRuC0bwl3hYb</a></td><td><a href="https://advancedplugins.net/item/AdvancedPets-UI.137">https://advancedplugins.net/item/AdvancedPets-UI.137</a></td></tr><tr><td><strong>AdvancedJobs UI</strong></td><td>Improve your players' experience with the new ultimate AdvancedJobs UI</td><td><a href="/files/lhjD0MDfqJ7jeg5RlSJl">/files/lhjD0MDfqJ7jeg5RlSJl</a></td><td><a href="https://advancedplugins.net/item/AdvancedJobs-UI.189">https://advancedplugins.net/item/AdvancedJobs-UI.189</a></td></tr></tbody></table>

## Video Guide

We now have a YouTube video guide available on installing our UIs using ItemsAdder and Oraxen:

{% embed url="<https://youtu.be/bCKd6C4aR9E>" %}

Using timestamps navigate between ItemsAdder (starts 0:27s) and Oraxen installations (Oraxen starts 2:25s).

The process explained in this video is the same for all UIs we have and you can follow this guide to install UIs with any of our offered packs.

## Text Guide

### For ItemsAdder

1. Copy the "ItemsAdder" folder from the Configurations folder into the "plugins" folder of your server.
2. In-game, run the "/iareload" and "/iazip" commands.
3. Open "\<Plugin name> Config (For ItemsAdder)" in the downloaded file *(E.g. "BattlePass Config (for ItemsAdder")*
4. Replace all contents of the Plugin's folder with the contents of the "\<Plugin name> Config (For ItemsAdder)" folder.
5. Restart your server

### For Oraxen

1. Copy the "Oraxen" folder from the Configurations folder into the "plugins" folder of your server.
2. In-game, run the "/oraxen reload all" command
3. Open "\<Plugin name> Config (For Oraxen)" in the downloaded file *(E.g. "BattlePass Config (for* Oraxen\_")\_
4. Replace all contents of the Plugin's folder with the contents of the "\<Plugin name> Config (For Oraxen)" folder.
5. Restart your server

## Common Problems

<details>

<summary>Help! My plugin GUI is full of gold nuggets</summary>

You have not installed or loaded the texture pack correctly yet! Make sure you added files in the ItemsAdder/Oraxen folder, then:\
\- For ItemsAdder run /iareload and /iazip commands\
\- For **Oraxen** run /oraxen reload all\
Restart your server and the UIs will be installed!

</details>

<details>

<summary>My GUI is offset</summary>

<img src="/files/3u3AzHpWGhMFwEpzsKDU" alt="" data-size="original">

If your GUI is offset like this and you are using Oraxen, you have not installed `glyphs` file's `shifts.yml` file correctly. Make sure you go into `/plugins/Oraxen/glyphs` and install the shifts.yml file from the pack. Make sure it overrides the file, as sometimes that is the problem. Afterwards restart.

</details>

<details>

<summary>I can't get it to work at all</summary>

Contact us on discord <https://advancedplugins.net/discord> and we will help you out ASAP.

</details>


# Introduction

Actions power some of our plugins. Like Abilities system, actions are based on triggers. Actions are mostly based on simplier triggers, with simplified conditions. Focus is on more external plugin hooks as well as Minecraft vanilla triggers.

## Used for our plugins, such as:

#### BattlePass: <https://advancedplugins.net/item/BattlePass.11>

#### AdvancedJobs: <https://advancedplugins.net/item/AdvancedJobs.187/>

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>


# Actions

<figure><img src="/files/IlfKqcoaiBoItJwGelTY" alt=""><figcaption><p><a href="https://mintservers.com/?utm_source=gitbook_wiki&#x26;utm_medium=banner&#x26;utm_content=gitbook"><strong>Sponsored by MintServers. AdvancedPlugins.net integration &#x26; auto updates. Unlimited RAM plan for only $9.99!</strong></a></p></figcaption></figure>

## Internal Action Types (36)

* [**block-break**](#block-break) - Break backs
* [**block-place** ](#block-place)- Place blocks
* [**bucket-place**](#bucket-place) - Place bucket
* [**chat** ](#chat)- Say something in chat
* [**chat-stripped**](#chat-stripped) - Saying something in chat but stripped of colour codes *(since v3.0.6)*
* [**right-click**](#right-click) - Right-click anything
* [**left-click**](#left-click) - Left click anything
* [**right-click-block** ](#right-click-block)- Right click a block
* [**left-click-block**](#left-click-block) - Left click a block
* [**consume**](#consume) - Consume a consumable
* [**craft**](#craft) - Craft items
* [**smith**](#smith) - Smith items
* [**damage-player**](#damage-player) - Deal damage to players
* [**enchant**](#enchant) - Enchant an item using an enchant table
* [**enchant-anvil**](#enchant-anvil) - Enchant an item using an anvil *(since v3.10)*
* [**enchant-all**](#enchant-all) - Enchant an item using an enchantment table OR anvil *(since v3.10)*
* [**execute-command**](#execute-command) - Execute a command in chat
* [**fish**](#fish) - Fishing
* [**gain-experience** ](#gain-experience)- Gain experience
* [**item-break**](#item-break) - Have an item break e.g pickaxe, sword
* [**fly** ](#fly)- Fly
* [**glide** ](#glide)- Glide
* [**sneak** ](#sneak)- Sneaking (Shifting)
* [**sprint** ](#sprint)- Sprinting
* [**swim** ](#swim)- Swimming
* [**move** ](#move)- Whenever you move a block regardless of how
* [**kill-mob**](#kill-mob) - Kill mobs (Use `advancedspawners_kill` for AdvancedSpawners mobs)
* [**kill-player**](#kill-player) - Kill players
* [**login** ](#login)**- Login**
* [**milk** ](#milk)- Milk a cow
* [**playtime** ](#playtime)- Time played measured in seconds. Must enable in `settings.yml`. *(since v3.10)*
* [**throw-projectile**](#throw-projectile) - When a player throws any projectile (egg, snowball, etc..). *(since v3.10)*
* [**regenerate** ](#regenerate)- Regenerate health
* [**ride-mob**](#ride-mob) - Ride a mob
* [**shear**](#shear)- Shear a sheep
* [**smelt** ](#smelt)- Smelt an item in a furnace
* [**tame** ](#tame)- Tame a pet (Ocelot/Wolf)
* [**honey-extract**](#honey-extract) - Extract honey
* [**honey-comb-extract**](#honey-comb-extract) - Extract honey comb with shears
* [**breed**](#breed) - Breed an entity
* [**brew**](#brew) - Brew a potion

## External Action Type (100+)

* **AdvancedSpawners (**[**https://advancedplugins.net/item/2**](https://advancedplugins.net/item/2)**)**
  * [**advancedspawners\_kill** ](https://as.advancedplugins.net/)- Killing custom mobs
* **McMMO** (New)
  * [**mcmmo\_gain\_exp**](#mcmmo-mcmmo_gain_exp) - Gain experience in skill
  * [**mcmmo\_level\_up\_skill**](#mcmmo-mcmmo_level_up_skill) - Level up an mcmmo skill
  * [**mcmmo\_level\_total\_skill**](#mcmmo-mcmmo_level_total_skill) - Level up an mcmmo skill (returns total level of skill)
* **MBedWars**
  * [**mbedwars\_break\_bed**](#mbedwars_break_bed) - When bed is broken
  * [**mbedwars\_kill**](#mbedwars_kill) - When kill is achieved
  * [**mbedwars\_stat\_change** ](#mbedwars_stat_change)- Stat changes
  * [**mbedwars\_buy\_item** ](#mbedwars_buy_item)- When item is bought
  * [**mbedwars\_join\_arena**](#mbedwars_join_arena) - When an arena is joined
  * [**mbedwars\_team\_eliminate** ](#mbedwars_team_eliminate)- When a teammate is eliminated
* **ChestShop**
  * [**chestshop\_create**](#chestshop-chestshop_create) - Placing/creating a chest shop.
  * [**chestshop\_buy**](#chestshop-chestshop_buy) - Buying items from a player's chest shop.
  * [**chestshop\_sell**](#chestshop-chestshop_sell) - Selling items to another player via a chest shop.
  * [**chestshop\_spend**](#chestshop-chestshop_spend) - Spending money at a chest shop.
  * [**chestshop\_profit**](https://app.gitbook.com/s/-MVKgJtPKw7gQhR_Osin/features/s#chestshop---chestshop_profit) - Making money from a chest shop.
  * **chestshop\_destroy** - Destroying a chest shop.
* **AdvancedEnchantments**
  * [**advancedenchantments\_enchant**](#advancedenchantments-advancedenchantments_enchant) - Adding a custom enchant to an item.
* **ASkyBlock**
  * [**askyblock\_create\_island**](#askyblock-askyblock_create_island) - Creating an island.
  * [**askyblock\_create\_warp**](#askyblock-askyblock_create_warp) - When a player creates a warp.
* **AuctionHouse by Kludge**
  * [**auctionhouse\_kludge\_list**](#auctionhouse-by-kludgemonkey-auctionhouse_list) - Listing an item on the auction house.
  * [**auctionhouse\_kludge\_list\_singular**](#auctionhouse-by-kludgemonkey-auctionhouse_list_singular) - Listing an item on the auction house.
  * [**auctionhouse\_kludge\_buy**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Buying an item from the auction house.
  * [**auctionhouse\_kludge\_buy\_singular**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Buying an item from the auction house.
  * [**auctionhouse\_kludge\_sell**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Successfully selling an item on the auction house.
  * [**auctionhouse\_kludge\_sell\_singular**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Successfully selling an item on the auction house.
  * [**auctionhouse\_kludge\_profit**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Making x money from selling.
  * [**auctionhouse\_kludge\_spend**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Spending x money on the auction house.
* **AutoSell**
  * [**autosell\_break**](#autosell-autosell_break) - Alternative to block\_break when autosell is applied (autosell breaks the normal action).
* **BedWars1058**
  * [**bedwars1058\_break\_beds**](#bedwars1058-bedwars1058_break_beds) - Breaking the beds of other teams.
  * [**bedwars1058\_kill\_players**](#bedwars1058-bedwars1058_kill_players) - Killing opponents.
  * **bedwars1058\_play\_games** - Playing BedWars games.
  * [**bedwars1058\_buy\_items**](#bedwars1058-bedwars1058_buy_items) - Buying items from the shop.
  * [**bedwars1058\_buy\_upgrades**](#bedwars1058-bedwars1058_buy_upgrades) - Buying team upgrades from the shop.
* **Benzimmer's KOTH**
  * [**koth\_capture**](#benzimmers-koth-koth_capture) - Capture for X seconds (time in seconds is progress).
  * [**koth\_win\_cap**](#benzimmers-koth-koth_win_cap) - Win the capture of a point.
* [**BuildBattle by Tigerpanzer**](https://www.spigotmc.org/resources/44703/)
  * [**buildbattle\_join**](#buildbattle-by-tiger-buildbattle_join) - Join a game.
  * [**buildbattle\_play**](#buildbattle-by-tiger-buildbattle_play) - Triggered for every player when a game starts.
  * [**buildbattle\_finish**](#buildbattle-by-tiger-buildbattle_play) - Triggered for every player when a game finishes.
* **ChatReaction**
  * [**chatreaction\_win**](#chatreaction-chatreaction_win) - Winning chat reaction games (repeat/unscramble).
* **Citizens**
  * [**citizens\_click**](#citizens-citizens_click) - Clicking a citizens NPC.
  * [**citizens\_damage**](#citizens-citizens_damage) - Damaging a citizens NPC.
  * [**citizens\_kill**](#citizens-citizens_kill) - Killing a citizens NPC.
* **Clans**
  * [**clans\_create**](#clans-clans_create) - Creating a clan.
  * [**clans\_join**](#clans-clans_join) - Joining a clan..
* **ClueScrolls**
  * [**cluescrolls\_complete\_clue**](https://app.gitbook.com/s/-MVKgJtPKw7gQhR_Osin/features/cluescrolls---cluescrolls_complete_clue) - Complete a clue.
  * [**cluescrolls\_complete\_scroll**](https://app.gitbook.com/s/-MVKgJtPKw7gQhR_Osin/features/cluescrolls---cluescrolls_complete_scroll) - Complete a scroll.
* **CrateReloaded**
  * [**cratereloaded\_open**](#cratereloaded-cratereloaded_open) - Opening a crate.
* **CratesPlus**
  * [**cratesplus\_open**](#cratesplus-cratesplus_open) - Opening a crate.
* **CrazyCrates**
  * [**crazycrates\_open**](#crazycrates-crazycrates_open) - Opening a crate.
* **CrazyEnvoy**
  * [**crazyenvoy\_open\_envoy**](#crazyenvoy-crazyenvoy_open_envoy) - Opening an envoy crate/drop.
  * [**crazyenvoy\_use\_flare**](#crazyenvoy-crazyenvoy_use_flare) - Using a flare to start an envoy.
* **DiscordMinecraft**
  * [**discordminecraft\_link**](#discordminecraft-discordminecraft_link-probably-broken) - Link your Discord account to Minecraft.
* **ExcellentCrates**
  * [**excellentcrates\_open**](#excellentcrates-excellentcrates_open) - Opening a crate.
* **FactionsUUID**
  * [~~**factionsuuid\_kill\_enemy**~~](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - **Disabled due to name issues**
* **Jobs**
  * [**jobs\_join**](#jobs-jobs_join) - Joining a job.
  * [**jobs\_gain\_exp**](#jobs-jobs_gain_exp) - Gaining experience from working.
  * [**jobs\_level\_up**](#jobs-jobs_level_up) - Leveling up.
* **Lands**
  * [**lands\_join**](#lands-lands_join) - Join a land.
  * [**lands\_leave**](#lands-lands_leave) - Leave a land.
  * [**lands\_create**](#lands-lands_create) - Create a land.
  * [**lands\_disband**](#lands-lands_disband) - Disband a land.
  * [**lands\_invited**](#lands-lands_invited) - Be invited to a land.
  * [**lands\_claim\_chunk**](#lands-lands_claim_chunk) - Claim a chunk for your land.
* **LobbyPresents**
  * [**lobbypresents\_find**](#lobbypresents-by-poompk-lobbypresents_find) - Find a lobby present.
* **MoneyHunters**
  * [**moneyhunters\_level\_up**](#moneyhunters-moneyhunters_level_up) - Leveling up.
  * [**moneyhunters\_gain\_exp**](#moneyhunters-moneyhunters_gain_exp) - Gaining experience from working.
* **MythicMobs**
  * [**mythicmobs\_kill\_mob**](#mythicmobs-mythicmobs_kill_mob) - Killing a MythicMobs mob.
* MMOCore
  * mmocore\_level\_up\_skill - Level up a skill
  * mmocore\_gain\_exp - Gain exp from a skill
* **PlaceholderAPI**
  * [**placeholderapi\_match\_placeholder**](/actions/placeholderapi-actions) - Value must match the variable
  * [**placeholderapi\_integer\_placeholder**](/actions/placeholderapi-actions) - Placeholder will be set to progress.
* **PlotSquared**
  * [**plotsquared\_claim**](#plotsquared-plotsquared_claim) - Claim a PlotSquared plot.
  * [**plotsquared\_visit**](#plotsquared-plotsquared_visit) - Visit a player's plot.
  * [**plotsquared\_trust\_player**](#plotsquared-plotsquared_trust_player) - Trust another player.
  * [**plotsquared\_become\_trusted**](#plotsquared-plotsquared_become_trusted) - Become a trusted player (must be online).
  * [**plotsquared\_rate**](#plotsquared-plotsquared_rate) - Rate a player's plot.
  * [**plotsquared\_teleport**](#plotsquared-plotsquared_teleport) - Teleport to a player's plot.
* **ProCosmetics**
  * [**procosmetics\_spend**](https://app.gitbook.com/s/-MVKgJtPKw7gQhR_Osin/features/procosmetics---procosmetics_spend) - Spend X amount on cosmetics.
  * [**procosmetics\_buy\_treasure**](#procosmetics-procosmetics_buy_treasure) - Buying treasures from ProCosmetics.
  * [**procosmetics\_open\_treasure**](#procosmetics-procosmetics_open_treasure) - Opening treasures from ProCosmetics.
  * [**procosmetics\_buy\_cosmetic**](#procosmetics-procosmetics_buy_cosmetic) - Buying cosmetics from ProCosmetics.
* **ShopGui+**
  * [**shopguiplus\_buy**](#shopguiplus-shopguiplus_buy) - When you purchase an item from the shop. The progress will be the amount purchased.
  * [**shopguiplus\_buy\_singular**](#shopguiplus-shopguiplus_buy_singular) - When you purchase an item from the shop. The progress will always be 1 per transaction.
  * [**shopguiplus\_spend**](#shopguiplus-shopguiplus_spend) - When you purchase an item from the shop. The progress will be however much it cost the player.
  * [**shopguiplus\_sell**](#shopguiplus-shopguiplus_sell) - When you sell an item to the shop. The progress will be the amount sold.
  * [**shopguiplus\_sell\_singular**](#shopguiplus-shopguiplus_sell_singular) - When you sell an item to the shop. The progress will always be 1 per transaction.
  * [**shopguiplus\_profit**](#shopguiplus-shopguiplus_profit) - When you sell an item to the shop. The progress will be however much the player gained.
* **EconomyShopGUI**
  * [**economyshopgui\_buy**](#economyshopgui_buy) - When you purhcase an item from shop
  * [**economyshopgui\_sell**](#economyshopgui_sell) - When you sell an item in shop
* **Shopkeepers**
  * [**shopkeepers\_trade**](#shopkeepers-shopkeepers_trade) - Trade an item with a shopkeeper.
  * [**shopkeepers\_open**](#shopkeepers-shopkeepers_open) - Open a shopkeeper's GUI.
* [**SkillAPI**](https://www.spigotmc.org/resources/skillapi.4824/)
  * [**skillapi\_damage**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Damage someone with a skill.
  * [**skillapi\_combo**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Get an x hit combo (combo length is progress).
  * [**skillapi\_upgrade**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Upgrade a skill.
  * [**skillapi\_unlock**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Unlock a skill.
  * [**skillapi\_loose\_mana**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - When you loose mana for any reason.
  * [**skillapi\_reach\_level**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - When you reach x level (level is the progress).
  * [**skillapi\_change\_class**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - When you change your class.
* **Subside KoTH (King of The Hill)**
  * [**koth\_win\_cap**](#benzimmers-koth-koth_win_cap) - Win a KoTH and be the capping player.
  * [**koth\_capture**](#benzimmers-koth-koth_capture) - Capture a KoTH for X seconds (increments on time).
* **StrikePractice**
  * [**strikepractice\_host\_events**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Hosting an event for others to play.
  * [**strikepractice\_play\_games**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Playing matches.
  * [**strikepractice\_play\_bot\_games**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Playing matches against the bot.
  * [**strikepractice\_win\_games**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Winning matches.
  * [**strikepractice\_win\_bot\_games**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Winning matches against the bot.
  * [**strikepractice\_lose\_games**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Losing matches.
* **SuperiorSkyblock2**
  * [**superiorskyblock2\_create**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Creating an island.
  * [**superiorskyblock2\_join**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Joining a player's island.
  * [**superiorskyblock2\_upgrade**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Purchasing an island upgrade.
* **TokenEnchant**
  * [**tokenenchant\_gain**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Gain tokens.
  * [**tokenenchant\_enchant**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Enchant an item.
* **uSkyBlock**
  * [**uskyblock\_invite**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Inviting someone to your island.
  * [**uskyblock\_invited**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Being invited to an island.
  * [**uskyblock\_join**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Joining an island.
  * [**uskyblock\_island\_chat**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Talking in the island chat.
* **Votifier**
  * [**votifier\_vote**](https://github.com/AdvancedPlugins/Wiki/blob/main/AdvancedPluginsWiki/actions/broken-reference/README.md) - Just... vote lol
* **RivalHarvesterHoes**
  * [**rivalharvesterhoes\_harvest**](#rivalharvesterhoes---rivalharvesterhoes_harvest) - When a player breaks crops using hoe from this plugin
* **AdvancedMobs**
  * [**advancedmobs\_kill\_mob**](#advancedmobs---advancedmobs_kill-mob) - When a player kills a mob from this plugin

#### `block-break`

**Triggered:** When a player breaks a block.

**Variable:** The block's material.

#### `block-place`

**Triggered:** When a player places a block.\
\
**Variable:** The block's material.

#### `bucket-place`

**Triggered**: When player places a bucket

**Variable**: bucket's material (e.g. lava bucket)

#### `brew`

**Triggered**: when potion is brewed

**Variables:**

* `root`: [Potion Type](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionType.html)
* `isExtended`: `true` if potion has extended time (on versions <1.20.2)
* `isUpgraded` : `true` if potion is upgraded (on versions <1.20.2)
* `item`: brewed potion

#### `chat`

**Triggered:** When a player sends a message in chat.\
\
**Variable:** The message sent (lower case)

#### `chat-stripped`

**Triggered:** When a player sends a message in chat - stripped from colour codes.\
\
**Variable:** The message sent (lower case)

#### `right-click`

**Triggered:** Whenever a player right clicks.\
\
**Variable:** none.

#### `left-click`

**Triggered:** Whenever a player left clicks.\
\
**Variable:** none.

#### `right-click-block`

**Triggered:** Whenever a player right clicks a block.\
\
**Variable:** The block's material.

### `left-click-block`

**Triggered:** Whenever a player left clicks a block.\
\
**Variable:** The block's material.

#### `consume`

**Triggered:** Whenever a player consumes (eats) something.\
\
**Variable:** The item's material.

#### `craft`

**Triggered:** Whenever a player crafts an item.\
\
**Variable:** The crafted item's material.

#### `smith`

**Triggered:** Whenever a player smiths an item.\
\
**Variable:** The smithed item's material.

#### `damage-player`

**Triggered:** When a player deals damage to another player.\
\
**Variable:** none.

#### `enchant`

**Triggered:** When a player enchants an item using an enchantment table.\
\
**Variables:**

* `root`: The name of the enchantment (see [here](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html))
* `item`: The material of the enchanted item (e.g `diamond_sword`)
* `level`: The level of the enchantment
* `cost`: The level cost of enchanting

#### `breed`

**Triggered**: When player breeds a mob

Variables:

* root: EntityType
* name: Entity's custom name

#### `harvest-crops`

**Triggered**: When player harvests crops

Variables:

* root: Block type

#### `enchant-anvil`

**Triggered:** When a player enchants an item using an anvil.\
\
**Variables:**

* `root`: The name of the enchantment (see [here](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html))
* `item`: The material of the enchanted item, upper case (e.g `DIAMOND_SWORD`)
* `level`: The level of the enchantmente

#### `enchant-all`

**Triggered:** When a player enchants an item using an enchantment table OR an anvil.\
\
**Variables:**

* `root`: The name of the enchantment (see [here](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html))
* `level`: The level of the enchantment

#### `execute-command`

**Triggered:** When a player issues a server command (cannot be bungee).\
\
**Variable:**: The command executed (must be lower case).

#### `fish`

**Triggered:** When a player catches an item from fishing.\
\
**Variable:** The item caught from fishing.

#### `gain-experience`

**Triggered:** When a player gains exp.\
\
**Variable:** none.

#### `item-break`

**Triggered:** When the item a player is using breaks.\
\
**Variable:** The item's material.

#### `fly`

**Triggered:** When a player flies.\
**Extra Info:** Progression is measured in blocks flown.\
\
**Variable:** none.

#### `glide`

**Triggered:** When a player glides.\
**Extra Info:** Progression is measured in blocks glided.\
\
**Variable:** none.

#### `sneak`

**Triggered:** When a player moves a block sneaking.\
**Extra Info:** Progression is measured in blocks snuck.\
\
**Variables:**

* `isSwimming` - `true` / `false`
* `isGliding` - `true` / `false`
* `isFlying` - `true` / `false`
* `isSneaking` - `true` / `false`
* `isSprinting` - `true` / `false`

#### `sprint`

**Triggered:** When a player sprints a block.\
**Extra Info:** Progression is measured in blocks walked.\
\
**Variable:** none.

#### `swim`

**Triggered:** When a player swims a block.\
**Extra Info:** Progression is measured in blocks walked.\
\
**Variable:** none.

#### `move`

**Triggered:** When a player moves (basically just counting every other movement in one).\
**Extra Info:** Progression is measured in blocks walked.\
\
**Variable:** none.

#### `kill-mob`

**Triggered:** When a player kills a mob.\
\
**Variables:**

root: The type of mob.

* `spawn-reason` - [entity spawn reason](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html)
* `custom-name` - Custom name of entity

#### `kill-player`

**Triggered:** When a player kills another player.\
\
**Variable:** The name of the killed player.

#### `login`

**Triggered:** When a player logs into the server.\
\
**Variable:** none.

#### `milk`

**Triggered:** When a player milks a cow.\
\
**Variable:** none.

#### `playtime`

**Triggered:** Progressed 1 for every second a user is online (done in 5 second chunks, you must enable this in the settings.yml)\
\
**Variable:** none.

#### `throw-projectile`

**Triggered:** When a player throws/shoots a projectile\
\
**Variable:** The projectile thrown (see [here](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html)).

#### `regenerate`

**Triggered:** When a player regenerates health.\
\
**Variable:** The reason for regaining health (see [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityRegainHealthEvent.RegainReason.html)).

#### `ride-mob`

**Triggered:** When a player rides a mob.\
\
**Variable:** The type of entity.

#### `shear`

**Triggered:** When a player shears a sheep.\
\
**Variable:** none.

#### `smelt`

**Triggered:** When a player smelts an item in a furnace.\
\
**Variable:** The material of the item received from smelting (e.g, iron\_ingot).

#### `tame`

**Triggered:** When a player tames a mob.\
\
**Variable:** The type of entity tamed.

#### `honey-extract`

**Triggered:** When a player extracts honey.

**Variable:** Bee Nest or Bee Hive

#### `honey-comb-extract`

**Triggered:** When a player extracts honey combs using shears.

**Variable:** Bee Nest or Bee Hive

### External Actions

#### McMMO - `mcmmo_gain_exp`

**Triggered**: When player gains exp in specific skill

**Variable**: Skill name.

#### McMMO - `mcmmo_level_up_skill`

**Triggered**: When player levels up a skill

**Variable**: Skill name.

#### McMMO - `mcmmo_level_total_skill`

**Triggered**: When player levels up a skill (returns total level of skill)

**Variable**: Skill name.

#### mbedwars\_break\_bed

**Triggered**: When bed is broken

Variable:

root: team name

arena: arena name

#### mbedwars\_kill

**Triggered**: When kill is achieved

root: team name

#### mbedwars\_stat\_change

**Triggered**: Stat changes

root: stat

progress: how much of stat has been gained

#### mbedwars\_buy\_item

**Triggered**: When item is bought

root: item name

arena: arena name

#### mbedwars\_join\_arena

**Triggered**: When an arena is joined

root: team name

cause: <https://javadocs.mbedwars.com/de/marcely/bedwars/api/arena/AddPlayerCause.htm>

#### mbedwars\_team\_eliminate

**Triggered**: When a teammate is eliminated

root: team name

#### ChestShop - `chestshop_create`

**Triggered:** When a player creates a chest shop.\
\
**Variable:** none.

#### ChestShop - `chestshop_buy`

**Triggered:** When a player makes a purchase from a chest shop.\
\
**Variables:**

* `root`: The owner of the chest shop's name.
* `item`: Bought item

#### ChestShop - `chestshop_sell`

**Triggered:** When a player sells something from their chest shop.\
\
**Variables:**

* `root`: The owner of the client
* `item`: Sold item

#### ChestShop - `chestshop_spend`

**Triggered:** When a player makes a purchase from a chest shop - the cost is the progress.\
\
**Variable:** The owner of the chest shop's name.

#### ChestShop - `chestshop_profit`

**Triggered:** When a player sells something from their chest shop - the cost is the progress.\
\
**Variable:** The name of the client.

#### AdvancedEnchantments - `advancedenchantments_enchant`

**Triggered:** When a player enchants any item.\
\
**Variable:**

* root: Name of enchant (e.g. glowing)
* level: Level of enchant (e.g. 1)

#### ASkyBlock - `askyblock_create_island`

**Triggered:** When you create a skyblock island.\
\
**Variable:** The name of the schematic of the island.

#### ASkyBlock - `askyblock_create_warp`

**Triggered:** When you create an island warp.\
\
**Variable:** none.

#### AuctionHouse by Kludgemonkey - `auctionhouse_list`

**Triggered:** When a player lists an item on the auction house (progressed by the amount of said item).\
\
**Variable:** The material of the item being listed.

#### AuctionHouse by Kludgemonkey - `auctionhouse_list_singular`

**Triggered:** When a player lists an item on the auction house (only progressed by 1)\
\
**Variable:** The material of the item being listed.

#### AuctionHouse by Kludgemonkey - `auctionhouse_buy`

**Triggered:** When a player buys an item on the auction house (progressed by the amount of said item bought).\
\
**Variable:** The material of the purchased item.

#### AuctionHouse by Kludgemonkey - `auctionhouse_buy_singular`

**Triggered:** When a player buys an item on the auction house (only progressed by 1)\
\
**Variable:** The material of the purchased item.

#### AuctionHouse by Kludgemonkey - `auctionhouse_sell`

**Triggered:** When a player successfully sells an item on the auction house (progressed by the amount of said item sold).\
\
**Variable:** The material of the sold item.

#### AuctionHouse by Kludgemonkey - `auctionhouse_sell_singular`

**Triggered:** When a player successfully sells an item on the auction house (only progressed by 1).\
\
**Variable:** The material of the sold item.

#### AuctionHouse by Kludgemonkey - `auctionhouse_profit`

**Triggered:** When a listed item is sold - the amount of money you make from it is the progress.\
\
**Variable:** The material of the sold item.

#### AuctionHouse by Kludgemonkey - `auctionhouse_spend`

**Triggered:** When you purchase an item from the auction house - the amount of money spent is the progress.\
\
**Variable:** The material of the item purchased.

#### AutoSell - `autosell_break`

**Triggered:** When you break a block whilst autosell is enabled.\
\
**Variable:** The material of the block broken.

#### BedWars1058 - `bedwars1058_break_beds`

**Triggered:** When a player breaks a team's bed.\
\
**Variable:** The team of the broken bed.

#### BedWars1058 - `bedwars1058_kill_players`

**Triggered:** When a player kills an enemy player.\
\
**Variable:** The cause of death (`UNKNOWN`, `EXPLOSION`, `VOID`, `PVP`, `PLAYER_SHOOT`)

#### BedWars1058 - `bedwars1058_buy_items`

**Triggered:** When a player purchases an item.\
\
**Variable:** none.

#### BedWars1058 - `bedwars1058_buy_upgrades`

**Triggered:** When a player buys a team upgrade.\
\
**Variable:** none.

#### Benzimmer's KOTH - `koth_capture`

**Triggered:** When a player captures a point for x time (the amount of time captured in seconds is the progress).\
\
**Variable:** The name of the KOTH.

#### Benzimmer's KOTH - `koth_win_cap`

**Triggered:** When a player wins the capture for a KOTH.\
\
**Variable:** The name of the KOTH

#### BuildBattle by Tiger - `buildbattle_join`

**Triggered:** When a player joins a BuildBattle game.\
\
**Variable:** The name of the map.

#### BuildBattle by Tiger - `buildbattle_play`

**Triggered:** When a player is in a game and it starts.\
\
**Variable:** The name of the map.

#### BuildBattle by Tiger - `buildbattle_finish`

**Triggered:** When a player is in a game when it finishes.\
\
**Variable:** The name of the map.

#### ChatReaction - `chatreaction_win`

**Triggered:** When a player wins a ChatReaction competition.\
\
**Variable:** none.

#### Citizens - `citizens_click`

**Triggered:** When a player click a citizens NPC.\
\
**Variable:** The name of the NPC.

#### Citizens - `citizens_damage`

**Triggered:** When a player damages a citizens NPC (normally requires Sentinel).\
\
**Variable:** The name of the NPC.

#### Citizens - `citizens_kill`

**Triggered:** When a player kills a citizens NPC (normally requires Sentinel).\
\
**Variable:** The name of the NPC.

#### Clans - `clans_create`

**Triggered:** When a player creates a clan.\
\
**Variable:** none.

#### Clans - `clans_join`

**Triggered:** When a player joins a clan.\
\
**Variable:** none.

#### ClueScrolls - `cluescrolls_complete_clue`

**Triggered:** When a player completes a clue.\
\
**Variable:** The type of clue.

#### ClueScrolls - `cluescrolls_complete_scroll`

**Triggered:** When a player completes a scroll.\
\
**Variable:** The tier type.

**MMOCore** - `mmocore_level_up_skill`

**Triggered**: When player levels up a skill

**Variable**: skill type name (e.g. ARCHERY)

**MMOCore** - `mmocore_gain_exp`

**Triggered**: when player gains exp from a skill

**Variable**: skill type name (e.g. ARCHERY)

#### CrateReloaded - `cratereloaded_open`

**Triggered:** When a player opens a CrateReloaded crate.\
\
**Variable:** The name of the crate opened.

#### CratesPlus - `cratesplus_open`

**Triggered:** When a player opens a CratesPlus crate.\
\
**Variable:** The name of the crate opened.

#### CrazyCrates - `crazycrates_open`

**Triggered:** When a player opens a CrazyCrates crate.\
\
**Variable:** The name of the crate opened.

#### CrazyEnvoy - `crazyenvoy_open_envoy`

**Triggered:** When a player opens an envoy crate.\
\
**Variable:** The name of the tier of crate.

#### CrazyEnvoy - `crazyenvoy_use_flare`

**Triggered:** When a player uses an envoy flare to start an envoy.\
\
**Variable:** none.

#### DiscordMinecraft - `discordminecraft_link` *(probably broken)*

**Triggered:** When a links their discord account.\
\
**Variable:** none.

#### ExcellentCrates - `excellentcrates_open`

**Triggered:** When a player opens a crate.

**Variable:** crate name.

#### FactionsUUID - `factions_kill_enemy`

**Triggered:** When a player kills another person from an enemy faction.\
\
**Variable:** none.

#### Jobs - `jobs_join`

**Triggered:** When a player joins a job.\
\
**Variable:** The name of the job.

#### Jobs - `jobs_gain_exp`

**Triggered:** When a player gains experience (progress is the exp gained).\
\
**Variable:** The name of the player's job.

#### Jobs - `jobs_level_up`

**Triggered:** When a player levels up (progress is set to this level).\
\
**Variable:** The name of the player's job.

#### Lands - `lands_join`

**Triggered:** When a player joins a land.\
\
**Variable:** none.

#### Lands - `lands_leave`

**Triggered:** When a player leaves a land.\
\
**Variable:** none.

#### Lands - `lands_create`

**Triggered:** When a player creates a land.\
\
**Variable:** none.

#### Lands - `lands_disband`

**Triggered:** When a player disbands their land.\
\
**Variable:** none.

#### Lands - `lands_invited`

**Triggered:** When a player is invited to a land.\
\
**Variable:** none.

#### Lands - `lands_claim_chunk`

**Triggered:** When a player claims a chunk for their land.\
\
**Variable:** none.

#### LobbyPresents by Poompk - `lobbypresents_find`

**Triggered:** When a player finds a present.\
\
**Variable:** The ID of the present.

#### MoneyHunters - `moneyhunters_level_up`

**Triggered:** When a player levels up (the progress is set to their level).\
\
**Variable:** The name of their job.

#### MoneyHunters - `moneyhunters_gain_exp`

**Triggered:** When a player tames a mob (the progress is increased by the given xp).\
\
**Variable:** The name of their job.

#### MythicMobs - `mythicmobs_kill_mob`

**Triggered:** When a player kills a MythicMobs mob.\
\
**Variable:** The name of the type of mob.

#### PlaceholderAPI - `placeholderapi_match_<PLACEHOLDER>`

**Description:** When the placeholder is resolved for the player, it will progress if the variable is the same as what the placeholder resolves to. E.g if the type was as `placeholderapi_match_essentials_flying` and the variable was true, if the player was flying the action would progress.

#### PlaceholderAPI - `placeholderapi_integer_<PLACEHOLDER>`

**Description:** Resolves the placeholder for the player and sets the progress of the action to the value of the placeholder (**the resolved value must be an integer, e.g 342653476**). An example would be the type as `placeholderapi_integer_gemseconomy_balance_default` with the variable none and the required progress 10000. When they get 10000 gems it will be completed.\
\
**Variable:** none.

#### PlotSquared - `plotsquared_claim`

**Triggered:** When a player claims their plot.\
\
**Variable:** auto or manual.

#### PlotSquared - `plotsquared_visit`

**Triggered:** When a player visits another player's plot.\
\
**Variable:** The owner of the plot's username or `none` if not found.

#### PlotSquared - `plotsquared_trust_player`

**Triggered:** When a player trusts another player.\
\
**Variable:** none.

#### PlotSquared - `plotsquared_become_trusted`

**Triggered:** When a player becomes trusted on another player's plot.\
\
**Variable:** none.

#### PlotSquared - `plotsquared_rate`

**Triggered:** When a player rates another player's plot.\
\
**Variable:** none.

#### PlotSquared - `plotsquared_teleport`

**Triggered:** When a player teleports to a plot.\
\
**Variable:** The owner of the plot's username or `none` if not found.

#### ProCosmetics - `procosmetics_spend`

**Triggered:** When a player spends coins on a cosmetic or treasure chest (the progress is the amount spent).\
\
**Variable:** `treasure-chest` or `cosmetic` depending on what was bought.

#### ProCosmetics - `procosmetics_buy_treasure`

**Triggered:** When a player buys a treasure.\
\
**Variable:** The name of the treasure.

#### ProCosmetics - `procosmetics_open_treasure`

**Triggered:** When a player opens a treasure.\
\
**Variable:** The name of the treasure.

#### ProCosmetics - `procosmetics_buy_cosmetic`

**Triggered:** When a player buys a cosmetic.\
\
**Variable:** The type of cosmetic.

#### ShopGuiPlus - `shopguiplus_buy`

**Triggered:** When a player purchases an item from the shop. The progress will be the amount of items purchased\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### ShopGuiPlus - `shopguiplus_buy_singular`

**Triggered:** When a player purchases an item from the shop. The progress will always be 1\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### ShopGuiPlus - `shopguiplus_spend`

**Triggered:** When a player purchases an item from the shop. The progress will be the amount it cost the user rounded up to the nearest real number (2.4 -> 3)\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### ShopGuiPlus - `shopguiplus_sell`

**Triggered:** When a player sells an item to the shop. The progress will be the amount of items sold.\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### ShopGuiPlus - `shopguiplus_sell_singular`

**Triggered:** When a player sells an item to the shop. The progress will always be 1.\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### ShopGuiPlus - `shopguiplus_profit`

**Triggered:** When a player sells an item to the shop. The progress will be the amount it cost the user rounded up to the nearest real number (2.4 -> 3)\
\
**Variables:**

* `root`: The item that was purchased (e.g iron\_sword:0)
* `shop`: The ID of the shop the item was purchased from (e.g foodstuffs)
* `item-id`: The ID of the item in the shop (e.g 2, 6, or 8)

#### EconomyShopGUI - `economyshopgui_buy`

**Triggered:** When a player purchases an item from the shop.\
**Variable:** The item that was purchased

#### EconomyShopGUI - `economyshopgui_sell`

**Triggered:** When a player sells an item in the shop.\
**Variable:** The item that was sold

#### Shopkeepers - `shopkeepers_trade`

**Triggered:** When a player trades with a shopkeeper.\
\
**Variable:** The UUID of the shopkeeper.

#### Shopkeepers - `shopkeepers_open`

**Triggered:** When a player opens a shopkeeper.\
\
**Variable:** The UUID of the shopkeeper.

#### SuperiorSkyBlock2 - `superiorskyblock2_upgrade`

**Triggered:** Purchasing an island upgrade.\
**Variable:** The name of an upgrade (`plugins\SuperiorSkyblock2\modules\upgrades`)

### RivalHarvesterHoes - `rivalharvesterhoes_harvest`

**Triggered:** When a player breaks crops using hoe from this plugin

**Variables:**

root: crop block

* `item` - Hoe item

#### AdvancedMobs - `advancedmobs_kill-mob`

**Triggered:** When a player kills mob from this plugin

**Variable:** The mob type


# PlaceholderAPI Actions

Learn how you can integrate almost any other plugin into your actions.

Actions support PlaceholderAPI’s placeholders. Here you will learn how you can add any plugin, which has PlaceholderAPI's support to your actions.

### PlaceholderAPI - `placeholderapi_match_<PLACEHOLDER>`

**Description:** When the placeholder is resolved for the player, it will progress if the variable is the same as what the placeholder resolves to. E.g if the type was as `placeholderapi_match_essentials_fly` and the variable was yes, if the player was flying the action would progress.

```yaml
type: placeholderapi_match_essentials_fly
variable: 'yes'
required-progress: 5
```

### PlaceholderAPI - `placeholderapi_integer_<PLACEHOLDER>`

This works by matching your listed placeholder to a specific number. If your **PlaceholderAPI's** placeholder was `%player_level%` your action would look like this: `placeholderapi_integer_player_level`\
\
Example, if you wanted to make an action which activates as soon as player reaches experience level 100, you can set up an action looking like this:

```yaml
type: placeholderapi_integer_player_level 
required-progress: 10
```


# Setting up and using Variables

{% hint style="warning" %}
BattlePass 4.6.2 and AdvancedJobs 1.4.1 removed MaterialData from items in variables (`:0`, `:1` at the end of item's type).
{% endhint %}

The core of actions is the variable system. The basis of this system is that it is a filter. If the variable is set to `none`, there is no filter. If it is set, if whatever the variable is entered as when a user performs an action matches the variable, it will progress.

Recently, we've also added sub variables which can make this system a bit more confusing. Here are some examples for different action types with and without sub variables.

Every action has the global sub variables listed below:

```yml
variable:
  root: none
  holding:
    item: diamond_sword
    name: 'IDK some name'
    amount: 1
    model: 0 # Custom Model Data (for resource packs)
```

Every sub-variable is optional. If you don't specify it, it won't be filtered for. Therefore, you can just use `holding.item` if you wish, or just `holding.amount`.

## Basic Examples

**Without Sub-Variables:**

The following two actions function in the same manner, they're just two ways of formatting them.

`block-break`

```yml
variable:
  root: stone
```

`block-break`

```yml
variable: stone
```

Some more random examples: `throw-projectile`

```yml
variable: SNOWBALL
```

**With Sub-Variables:**

`block-break`

```yml
variable:
  root: diamond_block
  holding:
    item: golden_pickaxe
```

`enchant-all`

```yml
variable:
  root: SOUL_SPEED
  item: diamond_sword
  level: 3
```

This action is to enchant an item with soul speed 3 using an anvil.

**With Multiple Variables:**

`block-break`

```yml
variable: diamond_block OR gold_block OR iron_block
#This will progress the action if any of the blocks listed above is mined.
```

`block-place`

```yml
variable:
  - "stone"
  - "cobblestone"
  - "gravel"
# This will progress the quest if any of the blocks listed above is placed.
```

## Blacklists

To create blacklist in variable, use `!` in front of first element

**Examples without subroots:**

`block-break`

```yml
variable: "!stone OR dirt"
# This will progress the quest if player mined any block except stone and dirt
```

`block-place`

```yml
variable:
  - "!stone"
  - "dirt"
# This will progress the quest if player placed any block except stone and dirt
```

**Examples with subroots:**

```yml
variable:
  root: "none"
  holding:
    item: "!diamond_pickaxe"
# This will progress the quest if player doesn't hold diamond pickaxe
```

## Variable format

There are some formats which you can use in variables to achieve certain functionality

### "Contains" element

"CONTAINS" element check if action root/subroot contains specified text. TO create this, add `__` before element.

**Example:**

```yml
variable: __ORE
```

In this case, root will accept every item which contains ORE in name (it also applies for strings and entities)

### ItemsAdder (experimental)

Just add `itemsadder:` before element name to use itemsadder items, block or entities

**Example:**

```yml
variable: itemsadder:ITEM_NAME
```

### MMOItems (experimental)

Just add `mmoitems:` before element name to use items from this plugin

**Example:**

```yml
variable: mmoitems:ITEM_NAME
```

### Properties

You can add some properties in JSON format.

#### `nbt` property

Minecraft NBT String to modify required item. I.e. to create quest that progres only when we use unbreakable diamond pickaxe, we can use this property.

Note: Minecraft NBT String must contain item name. It also must be in correct format (1.20.5 changed format of NBT String i.e. in give command)

**Example:**

```yml
variable:
    root: none
    holding:
        item: "diamond_pickaxe{nbt: 'diamond_pickaxe[unbreakable={}]'}"
```

#### `faces` property

Support for block with multiple faces i.e. mushroom blocks.

**Example:**

```yml
variable: "brown_mushroom_block{faces: ['west', 'east']}"
```

#### `age` property

Age of Ageable material i.e. age of planted carrot

**Example:**

```yml
variable: "carrots{age: 3}"
```

#### `progress` property

Added progress property (similar to old `special-progress` section). It's multiplier of progress.

**Example:**

```yml
variable: "iron_ingot OR diamond{progress: 3}"
```

In this case, diamond gives 3 progress instead of 1.

{% hint style="info" %}
`special-progress` is still available for cases where we can't use progress property, i.e. in blacklists
{% endhint %}

## PAPI conditions

If you have PlaceholderAPI installed, you can use variables conditions to have more control over when player can progress quest.

There are 2 types of conditions:

* `or` (same as `||` in Java) - player must meet at least one condition to progress
* `and` (same as `&&` in Java) - player must meet all conditions to progress

**Example:**

```yml
variable:
    root: none
    conditions:
        or:
          - "%player_is_op% == yes"
          - "%player_level% > 10"
        and: []
```

In this case, action will progress only when the player is op OR has level greater than 10.


