
KH Economy
Withdraw/Deposit Money, Diamonds, or Emeralds. Earn payment at sundown. Admins can control the amounts
- Загрузки
- 2K
- Подписчики
- 7
- Обновлён
- 29 мая 2026 г.
- Лицензия
- All-Rights-Reserved
Опубликован 3 сентября 2025 г.
KH Economy Datapack
Overview
- Video Tutorial: https://www.youtube.com/watch?v=8Eycf-jzFbY (Updated version coming soon)
- Optional Fabric Mod for simplified commands: https://modrinth.com/mod/kh-economy-commands
- Command Note: This mod removes /trigger requirement (e.g.,
/trigger pay set <amount>becomes/pay <amount>) - If you find something not working please bring into to me on discord.
Compatibility
- Works with vanilla Minecraft and all mod loaders (Forge, Fabric, etc.)
- Server-side only - players don't need to download anything
- Compatible with Geyser for cross-platform play
- Works in single-player and multiplayer worlds
- Uses only vanilla mechanics
- Compatible with any shop mods/datapacks using physical items
- Compatibility with RPGCoins https://modrinth.com/datapack/rpgcoins (
/trigger toggleCopperCoins,/trigger toggleIronCoins, and/trigger toggleGoldCoinsto turn on Treasurer job needed find below)
Discord made for this mod, if you need to contact me feel free. https://discord.gg/KeddsfSPeP
Core Features
- Realtor Job allows full control of buying/selling chunks with open parties and claims
- Control which economy features are enabled or disabled on your server. All features are enabled by default.(Lottery, Blackjack, Emerald and/or Diamond banking
- Scoreboard-based currency system with emerald/diamond banking
- Pay players within 5 blocks proximity
- Mailbox system for sending money to offline players
- Dynamic stock market tied to job performance
- Built-in anti-cheat for all jobs
- Automated sunset payment system
- 12 skill trees with progression-based earnings
- Admin-controlled economy management (Treasurer role)
- Events system for all skill trees
- Social status ranks (Peasant, Commoner, Noble, Royal)
- Lottery system with adjustable odds
- Smart automated calculations for all systems
Economic Systems
Banking & Currency
- Withdraw/deposit emeralds or diamonds with adjustable values
- Default values: Diamonds = 100, Emeralds = 20
- Configurable tax rates on transactions (default 5%)
- City bank for community funds
Player Commands:
/trigger WithdrawDiamonds set <amount>/trigger WithdrawEmeralds set <amount>/trigger DepositDiamonds set <amount>/trigger DepositEmeralds set <amount>/trigger pay set <amount>- Send money to nearest player (5 block range)
Mailbox System
Send money to any player, even while offline. Supports up to 300 players.
Player Commands:
/trigger mailboxCreate- Create your mailbox/trigger mailCheck- Check incoming mail/trigger mailSend set <mailbox#>- Set recipient mailbox/trigger sendMoney set <amount>- Send money to set mailbox/trigger mailClaim- Claim received money
Admin Command:
/trigger mailAdminReset- Reset all mailboxes (Treasurer only)
Stock Market
Invest in 12 profession-based stocks (Farmer, Miner, Rancher, Hunter, Fisher, Blacksmith, Lumber, Cook, Archer, Warrior, Alchemy, and Enchanter) with dynamic pricing.
Price Mechanics:
- Daily updates at sunset based on worker productivity (XP earned)
- Every 1000 shares bought increases price by 1%
- Every 1000 shares sold decreases price by 1%
- Worker XP divided by 500 then added to share value
- If total XP is 1-99, stock reduces by 1%
- Stocks more easily decrease: 0-99 XP per day reduces stock by 1%
Market Events:
- Minor events: Affect 2 stocks with small changes
- Moderate events: Affect 4 stocks with medium changes
- Major events: Affect 6 stocks with large changes
- Random occurrence every minute (not during sunset payment)
- News events: 10% chance per minute, affects 1 random stock
- All events can be positive or negative (50/50 chance)
Market Conditions:
- Bull Market: Randomly increases stocks by 1-5% at sunset
- Bear Market: Randomly decreases stocks by 1-5% at sunset
- Sideways Market: No fluctuations
- Each condition has 33% chance of occurring
Volatility Settings (Treasurer):
- Low (1): 1% chance per minute, mostly minor/moderate events
- Mild (2): 2% chance per minute, balanced distribution (default)
- High (3): 5% chance per minute, prioritizes moderate/major events
Player Commands:
/trigger buy[skillname]Stock set <amount>- Purchase shares/trigger sell[skillname]Stock set <amount>- Sell shares/trigger give[skillname]Stock set <amount>- Gift shares to nearest player (5 blocks)/trigger checkMyShares- View your portfolio and total value/trigger checkMarketShares- View all current share prices
Admin Commands:
/trigger setStockMax set <amount>- Set maximum stock price/trigger setStockMin set <amount>- Set minimum stock price/trigger setVolatility set <amount>- Adjust market volatility (1-3)
Toggle Commands (Treasurer only):
/trigger toggleDiamondBank- Enable/disable diamond banking/trigger toggleEmeraldBank- Enable/disable emerald banking/trigger toggleLottery- Enable/disable lottery system/trigger toggleBlackjack- Enable/disable blackjack game
Toggle Mechanics:
- Each toggle cycles between enabled (1) and disabled (2)
- When disabled, players cannot access that feature's triggers
- Changes are announced server-wide
- Toggles persist through server restarts
Feature States:
- Enabled (1): Feature is active, players can use all related commands
- Disabled (2): Feature is locked, triggers are not enabled for players
Note: Disabling a feature does not affect existing transactions or games in progress.
Lottery System
Automated lottery with adjustable ticket price (default: $100).
Odds:
- 40% - Lose bet (adds to jackpot)
- 20% - Lose Half (adds to jackpot)
- 15% - Money back
- 17.4% - Double your bet
- 5% - Triple your bet
- 2.6% - Quadruple your bet
- .1% - Jackpot win (85% to player, 15% to city bank)
Player Commands:
/trigger lotteryBet- Buy one ticket at set price/trigger lotteryBetx5- Buy 5 tickets in one game
Admin Command:
/trigger lotteryChangePrice set <amount>- Adjust ticket price (Treasurer)
Skill Trees
Farming
Earn XP by harvesting crops.
XP Values:
- Wheat, Potatoes, Carrots, Beetroot: 1 XP each
- Pumpkins, Melons: 2 XP each
Level Requirements: 500→600→700→800→900→1000→1200→1400→1800 XP
Method: Break crops and collect items
Mining
Earn XP by mining ores.
XP Values:
- Coal/Copper: 0.1 XP (0.2 XP for deepslate)
- Iron/Redstone/Lapis/Gold: 1 XP (2 XP for deepslate)
- Diamond/Emerald: 4 XP (6 XP for deepslate)
- Nether Gold: 1 XP
- Nether Quartz: 0.5 XP
- Ancient Debris: 10 XP
Level Requirements: 200→300→400→500→600→700→700→800→900 XP
Method: Break ores and collect items
Ranching
Earn XP by farming animals.
XP Values:
- Breeding farm animals: 1 XP
- Collecting meat/eggs: 1 XP + payment
- Rabbit Foot: 20 XP
- Wool: 3 pieces = 1 payment
- Eggs: No reward yet
Level Requirements: 100→200→300→400→500→600→700→800→900 XP
Anti-Exploit: 10-second cooldown after killing 2+ animals within 1 second
Method: Kill animals, collect items, breed animals, shear sheep
Fishing
Earn XP by catching fish.
XP Values:
- Cod/Salmon: 1 XP
- Pufferfish: 2 XP
- Tropical Fish: 5 XP
Level Requirements: 50→100→150→200→250→300→350→400→450 XP
Method: Catch fish with fishing rod (rod must be actively used)
Archer
Earn XP by killing mobs with ranged weapons.
XP Values:
- Weak Mobs (zombie, skeleton, spider, cave spider, creeper, husk, stray, drowned, silverfish, endermite, magma cube, zombified piglin): 1 XP
- Medium Mobs (witch, phantom, blaze, ghast, piglin, hoglin, shulker, guardian): 3 XP
- Strong Mobs (enderman, wither skeleton, piglin brute, zoglin, pillager, vindicator, ravager): 6 XP
- Semi-Boss Mobs (evoker, vex, elder guardian): 10 XP
- Boss Mobs (wither, ender dragon, warden): 50 XP
Level Requirements: 50→100→150→200→300→400→500→600→700 XP
Method: Kill mobs with ranged weapons (bow, crossbow, trident)
Warrior
Earn XP by killing mobs with melee weapons.
XP Values:
- Weak Mobs (zombie, skeleton, spider, cave spider, creeper, husk, stray, drowned, silverfish, endermite, magma cube, zombified piglin): 1 XP
- Medium Mobs (witch, phantom, blaze, ghast, piglin, hoglin, shulker, guardian): 3 XP
- Strong Mobs (enderman, wither skeleton, piglin brute, zoglin, pillager, vindicator, ravager): 6 XP
- Semi-Boss Mobs (evoker, vex, elder guardian): 10 XP
- Boss Mobs (wither, ender dragon, warden): 50 XP
Level Requirements: 50→100→150→200→300→400→500→600→700 XP
Method: Kill mobs with melee weapons (sword, axe)
Hunter
Earn XP by hunting passive animals.
XP Values:
- Small Game (rabbit, bee, bat, frog, tadpole, allay): 1 XP
- Medium Game (fox, ocelot, parrot, turtle, axolotl, armadillo, squid, glow squid): 2 XP
- Large Game (wolf, polar bear, panda, strider): 3 XP
Level Requirements: 50→100→150→200→300→400→500→600→700 XP
Method: Kill animals
Blacksmith
Earn XP by crafting equipment. Bonus: Grants Minecraft XP (earned XP × level × 2).
XP Values:
- Iron equipment: 1 XP
- Gold equipment: 2 XP
- Diamond equipment: 3 XP
- Netherite equipment: 4 XP
Valid Items: Helmet, Chestplate, Leggings, Boots, Sword, Pickaxe, Axe, Shovel, Hoe
Level Requirements: 20→25→30→35→40→45→50→55→60 XP
Method: Craft at crafting table
Lumber
Earn XP by harvesting wood (no longer requires crafting planks).
Level Requirements: 100→150→200→250→300→350→400→450→500 XP
Method: Break logs (planks crafting optional)
Cooking
Earn XP by preparing food. Payment: Level × 2 × items crafted.
XP Values:
- Simple Foods (1 XP): Bread, cooked meats, baked potato, pumpkin pie, fermented spider eye
- Complex Foods (2 XP): Cookies, soups, honey bottle, mushroom stew, suspicious stew
- Advanced Foods (3 XP): Golden carrot, cake, rabbit stew, glistering melon
- Master Foods (4 XP): Golden apple
Level Requirements: 200→250→300→350→400→450→500→550→600 XP
Method: Craft at crafting table
Enchanting
Earn rewards by enchanting items. (Will expand depth soon)
Alchemy
Earn rewards by brewing potions. (Will expand depth soon)
Admin Controls
Treasurer Job
Special administrative role for managing the server economy.
Salary: $100 × level daily (1 XP per day)
Level Milestones: 10/12/14/16/18/20/22/24/26 XP
Appointment Commands (Op required):
/trigger setTreasurer set 1- Make nearest player treasurer/trigger removeTreasurer set 1- Remove treasurer role/function economy:jobs/treasurer/make_me_treasurer- Make yourself treasurer
Job Balance Control
Adjust payment multipliers for each profession (1-1000%, default: 100).
/trigger setFarmerMult set <amount>/trigger setMinerMult set <amount>/trigger setHunterMult set <amount>/trigger setCookMult set <amount>/trigger setLumberMult set <amount>/trigger setFisherMult set <amount>/trigger setRancherMult set <amount>/trigger setBlacksmithMult set <amount>
Tax Control
/trigger setTaxRate set <amount>- Set tax rate (1-99%, default: 5%)
Realtor Control(For Treasurer)
/trigger chunkClaimsResetAllNearbyPlayer/trigger chunkClaimsResetAllSelf/trigger setMinChunkPrice set <amount>/trigger setTreasurerNearbyPlayer/trigger removeTreasurerNearbyPlayer/trigger removeTreasurerSelf/trigger removeRealtorSelf/trigger removeRealtorNearbyPlayer/trigger setRealtorNearbyPlayer/trigger setRealtorSelf
Banking System
Configure withdrawal/deposit values and taxes.
Price Override (doesn't affect tax):
/trigger diamondPrice set <amount>- Set diamond value (default: 100)/trigger emeraldPrice set <amount>- Set emerald value (default: 20)
Diamond Settings:
/trigger diamondWithdrawValue set <amount>/trigger diamondWithdrawTax set <amount>- 0-99% (default: 0%)/trigger diamondDepositValue set <amount>/trigger diamondDepositTax set <amount>- 0-99% (default: 0%)
Emerald Settings:
/trigger emeraldWithdrawValue set <amount>/trigger emeraldWithdrawTax set <amount>- 0-99% (default: 0%)/trigger emeraldDepositValue set <amount>/trigger emeraldDepositTax set <amount>- 0-99% (default: 0%)
Skill Tree Events
Create time-limited events with boosted XP and payment for any skill tree. Events trigger after the next payment and notify players daily.
Setup Commands:
/trigger eventDaysDuration set <1-14>- Set event length/trigger eventMoneyMultiplier set <0-1000>- Set payment boost (100 = default, percentage-based)/trigger eventXPMultiplier set <0-1000>- Set XP boost (optional)/trigger event[skillname]- Start event (e.g., eventFarming, eventMining)/trigger eventCancel- Cancel active event
Usage Example: Set duration and multipliers, then start with /trigger event[skillname]. Wait for next payment to activate.
Raffle Events
Host raffles with various prize types. Prizes are drawn from city bank funds.
Prize Commands:
/trigger raffleCustom- Announce winner (you distribute prize manually)/trigger raffleDiamonds set <amount>- Set diamond prize/trigger raffleEmeralds set <amount>- Set emerald prize/trigger raffleMoney set <amount>- Set money prize
Raffle Settings:
/trigger raffleTicketPrice set <amount>- Set entry cost/trigger eventDaysDuration set <1-14>- Set raffle duration/trigger eventCancel- Cancel raffle and refund tickets
City Bank Management
/function economy:banking/check_city_bank- Check city funds/trigger spendCity set <amount>- Withdraw from city bank/trigger depositCity set <amount>- Deposit to city bank
Player Commands
Basic Commands
/trigger levelCheck- View all your skill levels/trigger pay set <amount>- Send money to nearest player (5 block range)
Stock Market Commands
See Stock Market section above for full command list.
Mailbox Commands
See Mailbox System section above for full command list.
Lottery Commands
See Lottery System section above for full command list.
Chunk Buying commands
/trigger chunkUnclaim/trigger confirmSale/trigger cancelSale
Games
BlackJack
Play against AI. Win doubles your bet, lose and you forfeit your wager.
Commands:
/trigger blackjackstart set <amount>- Start game with bet amount/trigger blackjackHit- Draw another card/trigger blackjackStand- End turn and calculate winner/trigger blackjackquit- Forfeit game and bet
Note: PvP blackjack is in beta testing.
Additional Information
Anti-Cheat System
Comprehensive protection against exploitation:
- Opening containers, placing blocks, or picking up player-dropped items resets job objectives
- Auto farms do not generate rewards - you must manually harvest/collect
- Killing multiple enemies rapidly triggers cooldown to prevent mob farm abuse
- Smart system detects legitimate play vs. automation
- All purchases verify sufficient funds before transaction
Payment System
Automated daily payment at sunset.
Formula: Level × work completed = payment (minus 5% tax)
Requirements:
- Must break/kill source AND collect items
- Tax automatically deducted to city bank
- Anti-exploit measures prevent duplication abuse
Social Ranks
Advance based on total lifetime earnings:
- Peasant (White) - Starting rank
- Commoner (Green) - $50,000 earned
- Noble (Yellow) - $200,000 earned
- Royal (Red) - $500,000 earned
Realtor System
- Open parties and claims Required for this portion
- Should work, still need to test online but pretty sure I got it. Will test very soon
- If you have questions just ask me on the discord linked. I'm available daily.
Added Features for Realtor
- Chunks owned by a player is now counted
- Chunk's cost and location will be remembered for up to 50 chunks for each player.
- New trigger to unclaim a chunk you own. You must stand in it and use the command below.
- unclaiming will give 1/2 of the money paid for the specific chunk back(the 1/2 will be adjustable in the next update.)
- unclaiming will unclaim the chunk in openparties mod also will reduce chunksOwned by 1 if successful
- chunksOwned vs open parties info will tell if a player cheated. (Used the direct command '/openpac-claim' instead of KH Economy)
- Admins now can set the minimum price limit for realtors
- Realtors can toggle on/off testmode to sell chunks to themselves
- Realtors get 5% commission(Will be adjustable in the future) the other 95% goes to cityBank
Commands:
/trigger setChunkPrice set <amount>(Realtor)/trigger sellChunk- Sell chunk to player
Installation
Place datapack in world/datapacks folder, then reload the world.
Uninstall
Follow these steps in order:
- Delete the
corefolder (located inkheconomy.datapack/data/economy/function) - Run
/reloadin-game - Run
/function economy:uninstall- Removes all economy data from world - Delete the
kheconomy.datapackfolder
Future Development Plans
- Continue optimizing performance while adding features
- Expand Enchanting and Alchemy skill trees
- Add coin flip game
- Create additional gambling mini-games
- Enhance city bank features
- Add Artisan, Smelting, and Tamer skill trees
- Implement master multiplier affecting all skill trees
- Grant real Minecraft XP with admin controls
Ченджлог
4.0Релиз26.1, 26.1.1, 26.1.2 · 29 мая 2026 г.
Removed RPG Coins Fixed errors on the console Fixed withdrawing/depositing cash Fixed system initialization
3.4.2Альфа1.21.8, 1.21.10 · 3 декабря 2025 г.
Fixes
- All Jobs now pay money correctly
- Removed all bugs that prevent leveling up or pay
- Balance changes
- Events now work
- Added safe guards to auto fix issues for players automatically. If the system breaks for common issues it will auto repair once every minute.
- City Tax can now go up to 99%
- MoneyDisplay will no longer turn on when you reload if disabled.
New Features
Miner
- Now gets paid for mining stone and deepslate
- 6 stone = 1$
- 8 deepslate = 1$
Clans
- This feature is added and should be fully functional but is still in testing will give more info after it is polished.
3.4.1Альфа1.21.8, 1.21.10 · 23 ноября 2025 г.
Emergency Patch
- Farmer and Miner Pay fixed and will now work.
3.4Альфа1.21.8, 1.21.10 · 22 ноября 2025 г.
Massive Update!
We took more time on this and plan to release less but better updates in the future. The main focus of this update is to reduce lag and fix as many issues as possible. All have been tested.
Important Notes
- If you own a server using kh economy please adjust the price of gold. It will be default 100 unless this is your first time using kh economy. Then the default will be 10. To change use /trigger goldPrice set
Optimization
- Going from 328 lines of code per tick to 17
- This means it's 2000% more efficient
Fixes
- /Pay has now been fix to work even under lag
- Events have now been fixed
- Realtor bugs have been worked out
- Many small fixes throughout the code
New Features
- More currency options (Diamonds, Emeralds, Copper, Gold, Gold Nuggets, Iron Nuggets, Iron, Lapis, Redstone, Netherite, and Cash)
- You can now Disable or Enable any currency Depositing or Withdrawing. /trigger diamondWithdrawBankEnabled set (1 or 2) 1=on/2=off
New Item Cash
- You can turn this off just like the other currencies
- This adds several simple items to the game called Bills
- 1, 5, 20, 100, 10,000$ Bills
- It is just renamed paper but you can throw it down or store it in a chest. It does work with Geyser and gives players a physical currency to use without disrupting the ores gameplay
- use /trigger withdrawCash set and the game will give you the accurate amount with the least amount of bills.
Comments
- We now own a server to test out mechanics to make them more smooth
- Really happy about where KH Economy stands after this update
- Please let us know in the discord if you find or have issues.
3.3.1Альфа1.21.8, 1.21.10 · 1 ноября 2025 г.
Fixes
- Players chunk coordinate issues(Now should accuratly store to help with unlaiming)
- /trigger pay now tells both players the amounts paid
- Added /trigger checkChunkOwnership (To help find chunks if it is off. Shouldn't need it for new ones but you might for old to help find them.)
Main Focus as of now
- Reviewing and improving all current systems to refine
- New features will take a back seat
- Redo mailbox system so when someone removes a mailbox it will go back and fill in that number instead of continuously going up.
- Need to fix /trigger give shares
- Fix issues with Events not starting
If you see or have issues please bring them to me so I can fix them I'm working on this daily to get everything perfect
3.3Альфа1.21.8, 1.21.10 · 31 октября 2025 г.
Realtor is now working
- Open parties and claims Required for this portion
- Should work, still need to test online but pretty sure I got it. Will test very soon
- If you have questions just ask me on the discord linked. I'm available daily.
Added Features
- Admins(Treasurers) now have triggers to make/remove themselves or a nearby player as a realtor (commands below)
- Chunks owned by a player is now counted
- Chunk's cost and location will be remembered for up to 50 chunks for each player.
- New trigger to unclaim a chunk you own. You must stand in it and use the command below.
- unclaiming will give 1/2 of the money paid for the specific chunk back(the 1/2 will be adjustable in the next update.)
- unclaiming will unclaim the chunk in openparties mod also will reduce chunksOwned by 1 if successful
- chunksOwned vs open parties info will tell if a player cheated. (Used the direct command '/openpac-claim' instead of KH Economy)
- Admins now can set the minimum price limit for realtors
- Realtors can toggle on/off testmode to sell chunks to themselves
- Realtors get 5% commission(Will be adjustable in the future) the other 95% goes to cityBank
New commands
- '/trigger chunkUnclaim' (Everyone)
- '/trigger chunkClaimsResetAllNearbyPlayer' (Treasurer)
- '/trigger chunkClaimsResetAllSelf' (Treasurer)
- '/trigger setChunkPrice set ' (Realtor)
- '/trigger setMinChunkPrice set ' (Treasurer)
- '/trigger sellChunk' (Realtor)
- '/trigger confirmSale' (Everyone)
- '/trigger cancelSale' (Everyone)
- '/trigger setTreasurerNearbyPlayer' (Treasurer)
- '/trigger removeTreasurerNearbyPlayer' (Treasurer)
- '/trigger removeTreasurerSelf' (Treasurer)
- '/trigger removeRealtorSelf' (Treasurer)
- '/trigger removeRealtorNearbyPlayer' (Treasurer)
- '/trigger setRealtorNearbyPlayer' (Treasurer)
- '/trigger setRealtorSelf' (Treasurer)
Other commands
- '/function economy:jobs/treasurer/make_me_treasurer' (Operator)
3.21Альфа1.21.8, 1.21.10 · 28 октября 2025 г.
Fixed
- Archer News now loads in and works
- Pay function now tells players what they get paid
Balanced Stock Market Events
- Minor events effects stocks with 1-2% slight down pressure the higher the stock goes
- Moderate events effects stocks with 1-3% slight down pressure the higher the stock goes
- Major events effects stocks with 1-5% slight down pressure the higher the stock goes
- Use to be up to 60% with massive downward pressure making it impossible to keep going up
Added Features
- Adjustable Dividends
- /trigger setDividendRate set <1-1000>
- 1=.1%
3.2Альфа1.21.10 · 27 октября 2025 г.
Fixes
Pay
- Showed no one was around even if there was someone. Will look into more but should work now.
Stock Market
- Was updating prices twice now fixed.
Realtor
- Solo test added and working
- Still not working for multiplayer but this is my main focus now and will be complete soon
Toggles
- Will accurately tell you Enabled/Disabled
- Removes the triggers so players do not see them
Added features
- Compatibility with RPGCoins https://modrinth.com/datapack/rpgcoins
- New toggles for the three coins in RPGCoins
- RPGCoins are fully adjustable just like diamonds
I chose to make this compatibility because they have a datapack to remove the recipies of the coins. It is important to have physical items for shops outside diamonds/emeralds. Since they might disrupt balancing.
Комментарии
Загружаем…