Simple Credits A simple, server-side money system for NeoForge 1.21.1: a credit balance per player, a server shop whose sell prices follow supply, and player-to-player transfers. Everything lives in one window opened with B.
AI disclosure: This mod was made with AI. All of its code, language files and in-game window drawing were written by Claude (an AI model by Anthropic). A human designer planned the features, made every design decision, and tests each version in game.
Features Balances Every player has one balance in credits. Whole numbers only, no decimals. Credits are not an item. You cannot withdraw them, so they cannot be duped, dropped or stolen. Balances are stored in the world save, so offline players keep theirs. Server shop: Sell / Buy back The server owner lists items the shop accepts (diamonds, gold, breeze rods, ...). Each has a base price and a base stock. Price = base price × 2^(1 − stock / base stock), always kept between ×0.5 and ×2. Selling raises the stock and lowers the price. Anyone can buy back from that stock for the current price plus a 10% fee, which raises the price again. Over time the stock drifts back toward the base stock (by default the gap halves every real hour while the server is running). With no trading, prices return to base. Only plain items are accepted: no renamed, enchanted or damaged items. Rounding never favours the player: sales round down, purchases round up, so splitting trades or selling and buying back never creates money. Server shop: Buy Fixed-price items with unlimited supply, such as a Mending book. Enchanted or customized items can be listed using the same item format as /give. Transfers Send credits to any player who has joined the server, even if they are offline. Name autocomplete (online players first), quick buttons for 100 / 1,000 / All, and a confirm step before anything is sent. Online recipients get a chat message right away. Offline recipients get a summary (total and number of transfers per sender) the next time they log in. A history of recent transfers sent and received (10 rows on screen, 20 stored per player by default). An optional transfer fee (a percentage, rounded up) can be set in the config. The default is 0%. Screen One window, three tabs: Sell / Buy back, Buy, Transfer. Your balance is always visible. Prices and stock update live while the window is open. If a price changed after you looked, the server rejects the trade and shows you the new price instead of charging something you did not see. Prices above or below base, and sent or received transfers, are marked with symbols as well as colours. English and Korean included. For server owners Install Required on both the server and the client. Minecraft 1.21.1, NeoForge 21.1.264 or newer. No other dependencies. File: simplecredits-0.1.0.jar. The internal mod ID is credits, so config files, the save file and commands use that name. Shop list: config/credits/shop.json Created on first start with a placeholder list. Edit it to set your own items and prices:
{ "sell": [ {"item": "minecraft:diamond", "basePrice": 100, "baseStock": 64} ], "buy": [ {"key": "mending", "item": {"id": "minecraft:enchanted_book", "count": 1, "components": {"minecraft:stored_enchantments": {"levels": {"minecraft:mending": 1}}}}, "price": 500} ] } Items not listed cannot be traded. Invalid lines are skipped with a warning in the log. Use /credits reload after editing.
Settings: config/credits-server.toml Starting balance (0), buy-back fee (10%), price floor and ceiling (×0.5 / ×2), stock half-life (60 minutes), maximum units per trade (2,304), transfer fee (0%), history size (20). Each option is described in the file.
Commands Any player:
/credits balance: show your own balance Operators (permission level 2):
/credits balance <player> /credits give | take | set <player> <amount> /credits stock <item> <amount> /credits price <item>, /credits sell <count>, /credits buyback <item> <count>, /credits buy <key> <count>: shop trades from the command line, for testing /credits reload: reload shop.json Players do not need any other commands; everything is done through the window.
Logging Every balance change writes one [credits] line to the server log: who, how much, why, and the resulting balance.
Notes Korean text in the window is drawn with the game's default font. For pixel-style Korean glyphs, use it together with a Korean bitmap font mod. Version 0.1.0 is the first release. The default shop list is only an example; balance it for your server.