Skip to content

iTzR1g/Coin-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoinPlugin

Paper plugin that adds a custom coin economy with coin items, checks, player trading, ore drops, Discord webhook integration, admin commands, and optional PlaceholderAPI support.

PlaceholderAPI

Soft depend — plugin works without it. If PAPI is present (2.11.6+ required for Paper 1.21.11), registers these placeholders:

Placeholder Description
%coin_balance% Your coin balance (integer)
%coin_balance_formatted% Your balance with commas

Commands

Command Description Permission
/bal /balance Check your coin balance
/transfer <amount> <player> Send coins to another player
/givecheck <amount> Create a paper check (deducts from your balance)
/baltop Show top 10 richest players
/trade <player> Send a trade request
/trade accept Accept a pending trade request
/trade deny Deny a pending trade request
/coins give <player> <amount> Give coins to a player coinplugin.admin.give
/coins remove <player> <amount> Remove coins from a player coinplugin.admin.remove
/coins set <player> <amount> Set a player's balance coinplugin.admin.set
/coins check [player] Check any player's balance coinplugin.admin.check
/coins reload Reload config.yml coinplugin.admin.reload
/coins discord baltop Post top 10 to Discord coinplugin.admin.discord
/coins discord balance [player] Post a player's balance to Discord coinplugin.admin.discord
/coins discord values Post top 30 item values to Discord coinplugin.admin.discord

Coin Crafting

Shaped recipe (3×3 diagonal):

[Diamond]  [empty]    [empty]
[empty]    [Gold]     [empty]
[empty]    [empty]    [Amethyst]

Right-click the coin (anywhere) to deposit it into your balance.

Coin Checks

Use /givecheck <amount> to convert coins from your balance into a tradeable paper check. Right-click the check to deposit its value. Checks use persistent data storage so values survive server restarts.

Trading

AxTrade-style trade GUI (6 rows, shared inventory):

  • /trade <player> sends a request; target uses /trade accept|deny
  • Own items go in the left 20 slots, partner's items on the right 20 slots
  • Add coins by clicking the coin display: left-click +1, right-click -1, shift-click ±10
  • Player head buttons at the top toggle ready — when both are ready the trade executes
  • Closing the inventory cancels and returns all items + refunds coins

Item values are shown live on the coin display (coins + items combined).

Item Valuation

Every Minecraft item has an estimated coin value used in the trade menu. Override any item's value in config.yml under item-values:

item-values:
  DIAMOND: 50.0
  NETHERITE_INGOT: 400.0

Items not listed use built-in defaults based on rarity and usefulness. View the full ranking on Discord with /coins discord values.

Custom Ore

DEEPSLATE_EMERALD_ORE spawns at Y=5 to Y=-53 during chunk generation (5% per chunk). Mining it drops 1–3 coins.

Ore Drops

Mining diamond and emerald ores has a chance to drop extra coins. Fortune increases both the chance and amount.

Ore No Fortune Fortune I Fortune II Fortune III
Diamond 1.5% — 1 coin 50% — 1–2 50% — 2–3 50% — 3–6
Emerald 10% — 1 coin 90% — 1–2 90% — 2–3 90% — 3–6

All rates are configurable in config.yml under ore-drops. Other ores are disabled by default.

Discord

Set discord.webhook-url in config.yml to a Discord channel webhook URL, then use:

  • /coins discord baltop — post top 10 balances
  • /coins discord balance <player> — post a player's balance
  • /coins discord values — post top 30 item values by coin worth

All discord commands require coinplugin.admin.discord permission (OP by default).

Build

Requires JDK 21+ and Gradle 9+.

./gradlew build

Output: build/libs/CoinPlugin-1.0.0.jar

Drop the jar into your server's plugins/ folder and restart.

About

a simple minecraft coin/economy system (for paper)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors