Coins v2
Coins v2 is an optimized plugin for defining custom coin variants and configuring drop chances for many different events. These events can be filtered, letting you control exactly when and how to drop coins.
This plugin was built from the ground up as a full rewrite of version 1 that has been around since 2016, addressing its limitations and built around years of community feedback. It is designed with modern Minecraft features in mind, including custom model data strings support. Compatibility starts from Minecraft version 1.21.4.
At its core, the plugin lets you define coin variants and assign them to events. Each event can be filtered and configured to fit your needs, making the config very powerful.
Supported platforms:
Spigot, Paper, Purpur, Folia
Supported versions:
Minecraft 1.21.4 and newer
Java 25 and newer
Got a question? I'm happy to help on Discord
Currencies
YAML:
# Default settings when a value has not been set for a specific currency.
default:
# Displayed format of the currency. Supports coloring in minimessage format. The default
# value renders as '1.23¢' when decimals is set to 2 (in specified color #6DD47E). The
# placeholder {amount} will be replaced by the value, and {symbol} will be replaced by
# the currency symbol configured down this config.
format: '<#6DD47E>{amount}{symbol}'
deposit:
# Message to display when coins of this currency are deposited. Supports coloring in
# minimessage format. The position to show this message at can be 'actionbar',
# 'subtitle', 'title', or 'chat'.
message: '<#148C30>↑ <#6DD47E>{format}'
position: 'actionbar'
# Settings when storage is used. Balances are not handled by Coins by default. Only if you
# enable integration (per currency), it will use these settings.
storage:
# This connection will be used when using 'sql' as storage for a currency.
sql:
enabled: false # don't forget to enable if used
url: 'jdbc:mysql://localhost:3306/coins' # 'coins' here is the database name
username: 'root'
password: 'p4ssw0rd'
currencies:
# The identifier of the currency. This will be applied to the value of coins. Changing
# this identifier makes it impossible to pick up already existing coins with this
# currency. Do not change this identifier when there are coins in circulation! This
# identifier is also used for storaging balances, if enabled (so don't change it).
'vault':
# The economy, or really the plugin to use. This economy name is case-sensitive. Only
# Vault is currently supported. Some plugins allow for multiple currencies.
economy: 'Vault'
# Whether this plugin should manage and store the currency. This plugin will then take
# care of its storage. The storage can either be to file, or SQL. When using 'file',
# balances are stored in Coins/storage/balances/{currency_id}/{player_uuid}.yml. With
# SQL, additional settings (host, port, etc.) need to be configured at 'storage' at
# the top of the config.
integration:
# Setting from 'true' to 'false' requires a server restart, to give other plugins a
# chance to integrate the plugin.
enabled: false
storage: 'file' # or 'sql'
# Amount of decimal points to render values for this currency. Decimals set to 2 will
# render as 1.23.
decimals: 2
# Currency symbol for this currency. Can be used as a placeholder by using {symbol}.
symbol: '¢'
# The singular and plural names of this currency.
name:
singular: 'Coin'
plural: 'Coins'
# See comments at the 'default' section for explanation. The default values for
# 'format' and 'deposit' are being overridden right here.
format: '<#6DD47E>{amount}{symbol}'
deposit:
message: '<#148C30>↑ {format}'
position: 'actionbar'
This plugin can manage and store the Vault economy for the server. Enable the integration in currencies.yml to use this. Each currency can have its own settings for integration and storage. Balances can be stored using either file storage, MySQL, or MariaDB.
Coins v2 is built to support different economies and currencies in the near future.
Creating different coins
YAML:
# Different coin variants can be configured in this config. These coins can then be used
# to define drops with different chances, in drops.yml.
# Default settings for a coin when the value has not been set. These describe the
# characteristics of the coin as an item stack. It is possible to add and override any of
# these values at different coin variants down the config at 'coins'.
default:
item:
# Type of the item can be 'material' or 'player_head'.
type: 'material'
# Namespaced identifier of an item type, or the texture value of a player head. Item
# types can be found at the suggestions of /give. Texture values can be found on
# websites like https://minecraft-heads.com.
value: 'minecraft:gold_nugget'
# Set the singular and plural name of the coin. Supports coloring in minimessage format.
name:
singular: '<#F9CE64>Coin'
plural: '<#F9CE64>Coins'
# Currency identifier to use for this coin, as defined in currencies.yml.
currency: 'vault'
# Don't allow coin modifications by crafting, anvil, etc.
immutable: true
meta:
# Add an enchanted effect to the coin.
enchanted: false
# Add a glow effect to the coin when it is on the ground. This allows the coin to be
# seen through blocks. Use a named text color, i.e. 'green', 'light_purple', etc.
glow-color: 'none'
# Show a hologram above the coin when it is dropped on the ground.
hologram: false
# Custom model data strings are used for resource packs. This example adds
# "minecraft:custom_model_data": {strings: ["coin"]} to the NBT of the item.
model-strings: ['coin']
# Lore tooltip lines for the coin. Supports coloring in minimessage format. Italic
# lore can be avoided by using <italic:false>.
lore: []
behavior:
# Set coins of the same value to merge when on the ground.
item-merge: false
# Let hoppers pick up dropped coins.
hopper-pickup: false
deposit:
# Sound to play when the coin is deposited. Sound types can be found at the
# suggestions of /playsound, but can also be custom when using a resource pack. Note
# that the sound is set into the item, so when the sound is changed, old coins still
# have the old sound attached to them.
sound: 'minecraft:item.armor.equip_gold'
volume: 0.50
pitch: 0.30
# Define different coins here. The values that are set will override the default values.
# The most common values to override are the item type and name. See above here for
# explanation of all the different settings.
coins:
'enchanted_gold_coin': # identifier of this coin
item: 'minecraft:gold_nugget'
name:
singular: '<#F9CE64>Coin of Gold'
plural: '<#F9CE64>Coins of Gold'
meta:
enchanted: true
'gold_coin': # a different coin with a different identifier
item: 'minecraft:gold_nugget'
name:
singular: '<#F9CE64>Coin of Gold'
plural: '<#F9CE64>Coins of Gold'
'silver_coin':
item: 'minecraft:iron_nugget'
name:
singular: '<#D2D2D2>Coin of Silver'
plural: '<#D2D2D2>Coins of Silver'
'bronze_coin':
item: 'minecraft:copper_nugget'
name:
singular: '<#E68D3F>Coin of Bronze'
plural: '<#E68D3F>Coins of Bronze'
behavior:
item-merge: true
'sun_coin':
item: 'minecraft:sunflower'
name:
singular: '<#FFAA00>Coin of the Sun'
plural: '<#FFAA00>Coins of the Sun'
meta:
enchanted: true
glow-color: 'gold'
deposit:
sound: 'minecraft:entity.experience_orb.pickup'
'bag_of_coins':
item:
type: 'player_head'
value: '95fd67d56ffc53fb360a17879d9b5338d7332d8f129491a5e17e8d6e8aea6c3a'
name:
singular: '<#FFFF55>Bag of Coins'
plural: '<#FFFF55>Bags of Coins'
meta:
hologram: true
deposit:
sound: 'minecraft:item.armor.equip_copper'
Visually, coins support a wide range of effects: an enchantment glint, a colored ground glow making them visible through blocks, a hologram when dropped, and more. Each coin can also play a different sound with adjustable volume and pitch when deposited, and can be configured to control whether hoppers can pick them up.
The plugin has 6 types of coins by default, as shown in the picture below. But it is up to you to define any type of coin!
Defining different drops
YAML:
# Different drop types can be configured in this config. These define when coins should be
# dropped. There are predefined event types for this, including the possibility to filter
# these events. Every drop has an event type it depends on, i.e. "advancement_done".
# Multiple drops can be registered per event type. Filters can be used after this,
# essentially modifying an existing event to fit your needs. Every predefined event
# supports a set of filters. After everything has been filtered, there's a section that
# defines what coins should be dropped, and what their chances are to be dropped. Note
# that this config is very dynamic! You can simply remove or add your own drop types.
# More info: https://plugin.coins.community/v2/drops/event-filters
# Default settings for a drop type when the value has not been set. It is only applied to
# those drops where the event type supports it.
default:
filters:
location:
# Worlds that are disabled by default. This setting can be completely overridden
# by adding it to the specific drop type.
disabled-worlds: []
drops:
# Identifier of the drop type; this can be anything you want.
'advancement_done':
# Then we pick an event type to depend on for this drop type. There are a set of event
# types that this plugin supports. For example, "advancement_done" is triggered when
# a player completes an advancement.
event: 'advancement_done'
# This drop type does not have any filters by default, 'filters:' is missing. So
# finally, the coins to drop are defined.
coins:
# Coin identifier 'bag_of_coins' as defined in coins.yml.
'bag_of_coins':
# Dropped coin's value will be random between 50 and 100. This can also be a whole
# number by setting it as 'value: 50'.
value: [50, 100]
# Chance to drop this coin is 100%.
chance: 1.00
'valuable_ore_break':
event: 'block_break'
# Used filters for this drop type. This filter has an initiator, a target, and a
# location. The initiator is the trigger for the event to occur. The target for this
# event type is simply the mined block.
filters:
initiator:
# Only allow players to be the initiator of this drop type.
type: ['minecraft:player']
target:
# Allow the mined block to be of exactly the same type as the item it drops. This
# means that coins won't drop if Silk Touch is used if set to false.
allow-same-block: false
# All the block types that are allowed to be mined for the coins to drop. This
# can be left away or left empty to allow any block type.
type:
- 'minecraft:diamond_ore'
- 'minecraft:deepslate_diamond_ore'
- 'minecraft:spawner'
- 'minecraft:emerald_ore'
- 'minecraft:deepslate_emerald_ore'
- 'minecraft:gold_ore'
- 'minecraft:deepslate_gold_ore'
- 'minecraft:nether_gold_ore'
coins:
# There is a 5% chance to drop an enchanted gold coin, 70% chance to drop a gold
# coin, and 25% chance to drop nothing (as that is the remaining chance).
'enchanted_gold_coin':
value: [20, 30] # random value between 20 and 30
chance: 0.05 # 5% chance
'gold_coin':
value: [12, 20] # random value between 12 and 20
chance: 0.70 # 70% chance
'common_ore_break':
# Another drop type is configured here, but then for less valuable ores, using the
# same event type as "valueable_ore_break".
event: 'block_break'
filters:
initiator:
type: ['minecraft:player']
target:
allow-same-block: false
type:
- 'minecraft:iron_ore'
- 'minecraft:deepslate_iron_ore'
- 'minecraft:lapis_ore'
- 'minecraft:deepslate_lapis_ore'
- 'minecraft:copper_ore'
- 'minecraft:deepslate_copper_ore'
- 'minecraft:nether_quartz_ore'
- 'minecraft:coal_ore'
- 'minecraft:deepslate_coal_ore'
- 'minecraft:redstone_ore'
- 'minecraft:deepslate_redstone_ore'
coins:
'gold_coin':
value: [12, 20]
chance: 0.10
'silver_coin':
value: [5, 12] # random value between 5 and 12
chance: 0.50 # 50% chance
'mining_block_break':
event: 'block_break'
filters:
initiator:
type: ['minecraft:player']
# This drop type requires the player to have this permission. It can also be
# removed to allow it for everyone by default.
permission: 'coins.drops.mining_block_break'
target:
allow-same-block: true
type:
- 'minecraft:stone'
- 'minecraft:deepslate'
- 'minecraft:granite'
- 'minecraft:diorite'
- 'minecraft:andesite'
- 'minecraft:blackstone'
- 'minecraft:basalt'
coins:
'bronze_coin':
value: [1, 5]
chance: 0.05
'enderman_pickup':
event: 'block_break'
enabled: false
filters:
initiator:
# This drop type is specifically made for endermen that break a block. It is
# disabled by default, as per 'enabled: false'. When enabled, it drops a glowing
# coin with a chance of 2% when an enderman picks up a block. Could be a fun
# addition!
type: ['minecraft:enderman']
coins:
'sun_coin':
value: [30, 50]
chance: 0.02
'player_crop_harvest':
# This event type is for full-grown crops that get broken.
event: 'crop_harvest'
filters:
initiator:
# Players are the only allowed initiator for this drop type. Villagers can also
# be an initiator; see the drop type below this one.
type: ['minecraft:player']
location:
# Set the maximum amount of coin drops per block location in a specific time. This
# can be useful to prevent spamming of growing crops with bone meal, breaking and
# repeat, using some sort of autoclickers.
cooldown:
cap-amount: 1 # allow once per 6 hours at a block location
duration: '6h'
coins:
'bronze_coin':
value: [1, 5]
chance: 0.50
'villager_crop_harvest':
event: 'crop_harvest'
enabled: false # not enabled by default
filters:
initiator:
type: ['minecraft:villager']
location:
cooldown:
cap-amount: 1
duration: '12h'
coins:
'bronze_coin':
value: 1
chance: 0.05
'animal_breed':
event: 'entity_breed'
filters:
location:
cooldown:
cap-amount: 1
duration: '2h'
coins:
'silver_coin':
value: [5, 12]
chance: 0.05
'bronze_coin':
value: [1, 5]
chance: 0.70
'fish_catch':
event: 'entity_catch'
filters:
target:
min-xp-drop: 1
coins:
'silver_coin':
value: [5, 12]
chance: 0.30
'hostile_entity_kill':
event: 'entity_death'
filters:
initiator:
type: ['minecraft:player'] # player kills
target:
# This will only allow hostile mobs to drop coins that are not from spawners nor
# from slime splits. The exclamation mark excludes the category.
category: ['hostile', '!from_spawner', '!from_split']
# The minimum percentage of damage that needs to come from a player for the target
# entity to drop coins.
min-player-damage: 0.80 # at least 80% of damage must come from players
location:
# Set the maximum amount of coin drops per block location in a specific time. This
# can be useful to prevent overuse of grinders.
cooldown:
cap-amount: 1 # allow once per
duration: '2h' # 2 hours at a block location
coins:
'enchanted_gold_coin':
value: [20, 30]
chance: 0.01
'gold_coin':
value: [12, 20]
chance: 0.05
'silver_coin':
value: [5, 12]
chance: 0.40
'bronze_coin':
value: [1, 5]
chance: 0.40
'passive_entity_kill':
event: 'entity_death'
filters:
initiator:
type: ['minecraft:player']
target:
# This will only allow passive mobs to drop coins that are not from spawners. The
# exclamation mark excludes the category.
category: ['passive', '!from_spawner']
min-player-damage: 0.70
location:
cooldown:
cap-amount: 1
duration: '2h'
coins:
'silver_coin':
value: [5, 12]
chance: 0.40
'bronze_coin':
value: [1, 5]
chance: 0.50
'spawner_entity_kill':
event: 'entity_death'
filters:
initiator:
type: ['minecraft:player']
permission: 'coins.drops.spawner_entity_kill' # requires this permission
target:
category: ['from_spawner'] # only mobs from spawners
min-player-damage: 0.90
location:
cooldown:
cap-amount: 1
duration: '6h'
coins:
'bronze_coin':
value: [1, 5]
chance: 0.90
'animal_tame':
event: 'entity_tame'
coins:
'enchanted_gold_coin':
value: [20, 30]
chance: 0.30
'gold_coin':
value: [12, 20]
chance: 0.60
'item_enchant':
event: 'item_enchant'
coins:
'gold_coin':
value: [12, 20]
chance: 0.05
'silver_coin':
value: [5, 12]
chance: 0.80
'item_repair':
event: 'item_repair'
coins:
'gold_coin':
value: [12, 20]
chance: 0.20
'silver_coin':
value: [5, 12]
chance: 0.80
'loot_chest_open':
event: 'loot_chest_open'
coins:
'sun_coin':
value: [30, 50]
chance: 0.05
'enchanted_gold_coin':
value: [20, 30]
chance: 0.10
'gold_coin':
value: [12, 20]
chance: 0.30
'silver_coin':
value: [5, 12]
chance: 0.30
'bronze_coin':
value: [1, 5]
chance: 0.20
'potion_brew':
event: 'potion_brew'
enabled: false
filters:
location:
cooldown:
cap-amount: 1
duration: '1h'
coins:
'bronze_coin':
value: [1, 5]
chance: 0.40
'recipe_unlock':
# Recipe unlocks are triggered for every new item that can be crafted. So for example,
# this is usually triggered 16 times for unlocking wool.
event: 'recipe_unlock'
coins:
'bronze_coin':
value: [1, 5]
chance: 0.50
- Completing an advancement
- Breaking a block (including Endermen)
- Harvesting crops (including Villagers)
- Breeding animals
- Catching fish or items
- Killing mobs
- Mobs dying from natural death
- Taming animals
- Enchanting items
- Repairing items
- Opening loot containers
- Brewing potions
- Unlocking recipes
Every event has a filter, which can be different for every drop. The settings within these filters are different for every event. Here are the most common aspects:
- Initiator: The trigger for the event to occur, like a player, entity or it could even be anything for some events.
- Target: The target of the event, like an entity that was hit, a block that was mined, or an advancement that was completed.
- Location: The location where the event occured at.
Commands
YAML:
# Commands of the plugin can be customized here. Currently only one command can be
# configured.
commands:
# Identifier of the logic to implement.
'mintage':
# Enable or disable this specific command.
enabled: true
# Command labels to set for this command. Anything after the first label will be
# aliases. By default, the command will be accessible with /mintage and /mint.
labels: ['mintage', 'mint']
# Permission that is required to use this command.
permission: 'coins.command.mintage'
'balance':
# Command /balance is disabled by default, because it is usually handled by another
# plugin by default.
enabled: false
labels: ['balance', 'money', 'coins']
permission: 'coins.command.balance'
- /mintage create <coin> [amount]
Create and add a defined coin to your inventory. - /mintage drop <location> <coin> <amount> <radius> <value>
Drop defined coins in a radius around a location. - /mintage reload
Reload all configurations. Some changes may require a restart. - /mintage value set <currency> <value>
Assign or change the value of a coin in your hand, for a specific currency. - /balance [currency]
Check your current balance for a specific currency.
Showcase
Coin of Gold was generated inside a loot chest
Bag of Coins was dropped for completing an advancement, and a Coin of Bronze was dropped for killing a passive mob
Components can be formatted using MiniMessage
'<#148C30>↑ <#6DD47E>{currency}{amount}''<#148C30>↑ <white><head:9f2143d0-349c-4d4b-b0ae-9013f39a59dd> <#6DD47E>{amount}''<#f9e76d>{amount} <gradient:#e39a33:#f9ce64>Coins''<minecoin_gold><lang:options.clouds.fancy> <lang:trim_material.minecraft.gold>''<white><head:jeb_> <rainbow>Rainbow Coin''<gold><sprite:"minecraft:items":item/raw_gold>'