📄
pasted-code-1791447163828.txt
txt
250 lines
▶
============================================================
FINAL ADDITIONS — NEW REQUIREMENTS ONLY
============================================================
### 1. BANK STONECUTTER + $10 OPTION
Add a new 10-dollar option to the Potato Bank GUI.
In BOTH BUY and SELL sections:
Order must be:
10$ → 1K → 10K → 100K
The 10$ option must perform a real transaction of exactly 10 money units.
It must use the same internal economy/balance system as the existing bank.
Do NOT create another economy or another balance.
The normal Minecraft Stonecutter must remain completely Vanilla.
Normal Stonecutter:
- Works exactly like normal Minecraft.
- Must NOT open the Potato Bank GUI.
Bank Stonecutter:
- Must be a separate custom Stonecutter.
- It must be obtainable with:
/stonecutter give bank
- Only this custom Bank Stonecutter opens the Potato Bank GUI.
- Identify the Bank Stonecutter using a secure PersistentDataContainer (PDC) identifier.
- A normal Stonecutter must never become a Bank Stonecutter just because it has the same material.
- Renaming or changing the Lore of a normal Stonecutter must NOT turn it into a Bank Stonecutter.
- The Bank Stonecutter identity must survive placement, breaking, moving and server restart.
- The command must have proper permission and TAB completion.
- Player-facing messages must be Persian.
### 2. SAFE BREAKING SYSTEM
Change the Robbery Safe breaking system.
Do NOT require the old special Safe Breaker stick for damaging the Safe door.
The Safe must have:
100 HP
Every valid hit on the Safe door must remove exactly:
4 HP
Example:
100 → 96 → 92 → 88 → ... → 4 → 0
Every hit must play an appropriate iron-breaking/iron-hit sound.
When the Safe reaches 0 HP:
- The Safe is destroyed.
- The active Safe/Robbery structure can explode/be removed according to the existing Robbery system.
- The Safe must NOT be permanently deleted from its configured location.
The exact configured Safe location must always be saved.
After the Robbery ends, the Safe must automatically respawn at EXACTLY the same configured location.
The respawned Safe must be fully functional again and ready for another Robbery.
The Safe location must survive server restart.
### 3. ROBBERY SPAWN PER CITY
Each city must have its own Robbery Spawn location.
City 1:
Robbery Spawn 1
City 2:
Robbery Spawn 2
City 3:
Robbery Spawn 3
Each Spawn location must be configurable/set separately and saved permanently.
When a Robbery ends, all players participating in THAT Robbery must immediately be teleported to the Robbery Spawn belonging to that city.
Examples:
City 1 Robbery → Spawn 1
City 2 Robbery → Spawn 2
City 3 Robbery → Spawn 3
Never teleport players to another city's Robbery Spawn.
This must work for EVERY Robbery ending condition, including:
- Normal Robbery completion
- Robbery timer ending
- Manual Robbery end command
- Robbery cancellation
- Robbery failure
- Leader death
- Any other condition that ends the active Robbery
If multiple Robberies are active in different cities at the same time, each Robbery must only teleport its own participants to its own city's Spawn.
If a city has no Robbery Spawn configured, do NOT teleport players to a random or different Spawn. Handle this safely and show an appropriate Persian message.
### 4. LEADER DEATH = ROBBERY ENDS
If the Leader of an active Robbery dies by ANY method, the Robbery must immediately end.
This includes death caused by:
- Another player
- Mob
- Sword
- Projectile
- Explosion
- Fall damage
- Lava
- Fire
- Void
- Any other damage/death cause
Leader death must always be detected reliably.
When the Leader dies:
1. End that Robbery immediately.
2. Close/end its active Robbery session.
3. Teleport all participants of that Robbery to the correct Robbery Spawn for that city.
4. Handle the Safe/Robbery structure according to the existing restoration/respawn system.
5. Do NOT affect Robberies running in other cities.
### 5. GLOBAL 90-MINUTE ROBBERY COOLDOWN
After a Robbery happens in ANY city, a global cooldown of:
90 MINUTES
must begin.
During this 90-minute cooldown, NO city can start another Robbery.
This is GLOBAL, not per-city.
Example:
City 1 Robbery starts and finishes.
→ Global 90-minute cooldown begins.
During these 90 minutes:
City 1 = cannot be robbed
City 2 = cannot be robbed
City 3 = cannot be robbed
After the 90 minutes completely expire:
All cities become available for Robbery again.
The cooldown must be persistent and safe across server restart.
The plugin must store the cooldown expiration time, not only a temporary memory value.
If the server restarts during the cooldown, the remaining cooldown must continue correctly.
Players attempting to start a Robbery during the cooldown must receive a clear Persian message showing that Robbery is temporarily unavailable and, if possible, the remaining time.
The cooldown must apply regardless of how the previous Robbery ended, including:
- Successful Robbery
- Timer expiration
- Manual `/robbery end`
- Cancellation
- Failure
- Leader death
- Any other condition that officially ends the Robbery
Do NOT create separate 90-minute cooldowns for each city.
There must be ONE shared global Robbery cooldown.
### 6. TAB SCOREBOARD — REAL POTATO BANK MONEY
The player's CURRENT Potato Bank balance must appear in the TAB scoreboard.
Use the SAME internal economy/balance used by `/money`.
Do NOT create:
- A second economy
- A second balance
- A fake balance
- A static value
The scoreboard must update automatically whenever the player's real balance changes.
This includes:
- Receiving money
- Spending money
- Selling items
- Buying items
- `/money pay`
- Any internal system adding money
- Any internal system removing money
The scoreboard and `/money` MUST always show exactly the same balance.
Use the existing valid placeholder if one already exists.
If no valid TAB-compatible placeholder exists, implement one properly.
Preferred placeholder:
%potatobank_balance_formatted%
Example:
- "&3&l💰 Money"
- "&e$%potatobank_balance_formatted%"
Formatted values may appear as:
$0
$500
$1K
$25K
$1M
$250M
Do NOT change or remove the existing Player, PlayTime, Ping, Server Address, Season or decorative scoreboard lines.
ONLY fix/add the Money value so that it displays the real current Potato Bank balance.
============================================================
END OF FINAL ADDITIONS
============================================================
📄
pasted-code-1791447195044.txt
txt
1244 lines
▶
MASTER COMBINED PROMPT — POTATO BANK + POTATO ROBBERY
IMPORTANT:
Build ONE single Minecraft plugin containing BOTH PotatoBank and PotatoRobbery.
The two systems MUST NOT be separate plugins.
There must be ONE final JAR, ONE plugin.yml, ONE plugin project, and ONE shared economy/data layer.
CRITICAL RULE:
Preserve ALL original features, commands, GUIs, gameplay, permissions, messages, configuration options, safety rules, and behavior from BOTH original specifications below.
Do NOT remove, simplify, silently reinterpret, or replace any original feature.
The ONLY architectural change is:
- PotatoBank + PotatoRobbery become one plugin.
- They use the same internal economy and treasury system.
- There is NO plugin-to-plugin connection.
- There is NO external PotatoBank dependency.
- There is NO second economy.
- There is NO duplicated city treasury.
- Robbery directly uses the same economy/treasury implementation that the Bank system uses.
UNIFIED ECONOMY RULE
There must be exactly ONE economy system inside the final plugin.
Personal balances, permanent bank cards, player payments, city treasuries, ore prices, scoreboard values, and robbery rewards all use the same internal economy.
The three city treasuries must be the same treasuries used by robbery.
When a robbery succeeds:
1. Read the selected city's real treasury.
2. Verify sufficient funds.
3. Remove the configured robbery amount from that treasury.
4. Distribute the stolen amount using the same internal player-money system.
5. Persist the transaction safely.
6. Never create money from nothing.
There must be no duplicated or shadow balances.
STABLE BANK CARD SYSTEM
Keep the original PotatoBank card system.
Every player gets exactly one unique permanent card number.
The card number:
- Is generated once.
- Is stored persistently.
- Is linked to UUID.
- Never changes after relog.
- Never changes after restart.
- Never changes after reload.
- Never collides with another card.
/money card must always display the player's stored card number.
When:
/money pay
is used:
- Resolve the card to the correct UUID.
- Check sender balance.
- Remove sender money.
- Add receiver money.
- Persist both safely.
- Never remove money if the card is invalid or receiver cannot be resolved.
ONE FINAL PLUGIN
The final result must be:
ONE compiled JAR.
No separate PotatoBank.jar.
No separate PotatoRobbery.jar.
Use one plugin name/project and keep both systems internally organized into clean modules/packages.
The developer may organize the source into classes such as:
- economy
- bank
- treasury
- cards
- robbery
- commands
- gui
- storage
- integration
- utilities
But everything must compile into ONE final plugin JAR.
The final plugin must target Paper/Purpur 1.21.x and Java 21 and must compile with:
mvn clean package
Do not leave TODOs, placeholders, pseudo-code, missing classes, or missing dependencies.
ORIGINAL POTATO BANK SPECIFICATION
POTATO BANK — COMPLETE PRODUCTION PLUGIN SPECIFICATION
Create a complete, production-ready Minecraft Paper/Purpur plugin called
“Potato Bank” (final Java package/plugin name may be chosen by the
developer unless I specify otherwise).
IMPORTANT: This specification is the complete current requirement. Do
not remove, simplify, replace, or silently reinterpret any feature
described below. The plugin must be safe against duplication, money
loss, item loss, inventory exploits, race conditions, and
restart/data-loss issues.
The plugin must be designed cleanly so other plugins can connect to its
economy through a public API.
============================================================ 1. MAIN
IDEA ============================================================
The plugin is a central economy/banking system for a Minecraft server.
It has:
1. Personal player bank accounts.
2. Unique bank cards for players.
3. Player-to-player money transfers.
4. A Stonecutter-based “Potato Bank” GUI.
5. SELL and BUY systems for configured ores/items.
6. Configurable ore prices.
7. Three independent city treasuries.
8. Admin controls for city treasuries and ore prices.
9. Scoreboard compatibility.
10. A public API so other plugins can add/remove/read player money and
city treasury money.
11. Persistent data that survives restart/reload/disconnect.
12. Persian player-facing text.
The economy must use one consistent internal integer currency
representation. Do NOT use floating-point values for money. Store money
as a long/integer number of the smallest currency unit to prevent
rounding errors.
============================================================ 2.
STONECUTTER = POTATO BANK
A normal VANILLA Minecraft Stonecutter is the physical entry point to
the bank.
When a player right-clicks a Stonecutter, open the custom Potato Bank
GUI.
The GUI title must clearly say:
“بانک پوتیتو”
Do NOT replace the Stonecutter with a custom block.
The Stonecutter itself remains a normal Stonecutter in the world.
Only the custom GUI interaction should be controlled. Do not globally
cancel unrelated inventory or block events.
============================================================ 3. BANK GUI
The GUI must have two main sections:
SELL BUY
The visual style should be inspired by the supplied Minecraft inventory
reference: - chest/inventory-style GUI - clean Minecraft appearance -
clear sections - decorative locked slots where necessary - player
inventory visible below - appropriate icons - Persian player-facing text
The exact slot layout can be configured.
The GUI must be secure: - GUI buttons cannot be taken. - Shift-click
cannot steal GUI items. - Dragging cannot place items into protected GUI
slots. - Double-click cannot collect GUI buttons. - Number-key swapping
cannot move protected GUI items. - Offhand swapping cannot exploit the
GUI. - No duplication. - No item loss. - Normal interaction with the
player’s own inventory must continue to work. - Do not globally cancel
InventoryClickEvent or InventoryDragEvent for all inventories.
When a transaction succeeds, keep the GUI open and update it
immediately.
============================================================ 4. SELL
SECTION ============================================================
The SELL section has exactly three main transaction buttons:
1K 10K 100K
These represent money amounts to be credited to the player’s personal
bank.
The configured ore/item is removed from the player’s inventory and the
corresponding money is added to the player’s bank.
The plugin must first verify that the player has enough items.
The transaction must be atomic:
CHECK ITEMS → CALCULATE → REMOVE ITEMS → ADD MONEY
If any step cannot safely complete: - do not remove items - do not add
money - do not partially complete the transaction
Never create money without removing the required item amount.
Never remove items without giving the correct money.
============================================================ 5. BUY
SECTION ============================================================
The BUY section also has exactly three transaction buttons:
1K 10K 100K
These spend money from the player’s personal bank and give the player
the configured ore/item.
The transaction must be:
CHECK BALANCE → CALCULATE ITEM AMOUNT → CHECK INVENTORY CAPACITY →
REMOVE MONEY → GIVE ITEMS
If the player does not have enough money: - do nothing - show a Persian
error - keep GUI open
If the player does not have enough inventory space: - do not remove
money - do not give partial items - show a Persian error - keep GUI open
The plugin must calculate the full resulting inventory state before
changing the bank balance.
============================================================ 6. PRICE
MODEL — IMPORTANT
Prices must be configurable per ore/item.
The configuration must support two useful concepts:
A) UNIT PRICE: The value of one item.
Meaning one Diamond has a value of 6 currency units.
B) OPTIONAL EXACT TRANSACTION RATES: For cases where an exact
1K/10K/100K transaction cannot be represented by a whole number of
items, the configuration may define exact item quantities for each
transaction button.
diamond: unit-price: 6 sell: 1k: 10k: 100k: buy: 1k: 10k: 100k:
Do NOT silently round prices in a way that causes hidden money creation
or loss.
If only unit-price is configured, the plugin must use a deterministic
integer-safe calculation and clearly enforce the configured
rounding/exactness policy. Prefer rejecting an invalid configuration at
startup rather than silently producing an unfair transaction.
The developer may choose the cleanest exact implementation, but it must
never use floating-point money calculations.
The price displayed to players must always match the active
configuration.
============================================================ 7.
SUPPORTED ORES
Initial money-related ores/items:
- IRON
- DIAMOND
- NETHERITE
- COPPER
- GOLD
The system must be expandable so more items can be added later.
Each item must have: - Minecraft material - configurable price -
configurable display name/icon if needed - optional custom-item
identification support
Do not hard-code these prices.
============================================================ 8. ORE
PRICE DISPLAY IN ITEM LORE
When an ore is configured as a money-related item, its value should be
visible in its item description/lore when the player hovers over it.
Diamond
ارزش: 6$
The exact Persian wording can be configured.
The lore system must not corrupt normal Minecraft items.
If changing the lore of vanilla items is unsafe or conflicts with
another plugin/resource pack, use a safe implementation or configurable
display behavior.
The active price must be shown correctly.
============================================================ 9. PLAYER
BANK ACCOUNT
Every player has a persistent personal bank balance identified by UUID.
The balance must survive: - server restart - plugin reload where
supported - player disconnect - reconnect
Never rely only on RAM.
Use safe persistent storage.
Money must be stored as an integer/long, never float/double.
The implementation must protect against negative balances unless an
explicit future feature enables debt.
============================================================ 10. /money
Command:
/money
Show the player’s current personal bank balance.
موجودی بانک شما: 250K
The exact message must be configurable in Persian.
============================================================ 11. /money
card ============================================================
Command:
/money card
Show the player’s bank-card information in chat.
━━━━━━━━━━━━━━━━ کارت بانکی ━━━━━━━━━━━━━━━━ نام: mamad_mango بانک: بانک
جمهوری پوتیتو شماره کارت: 4821-7392-1546-8273 ━━━━━━━━━━━━━━━━
Every player must receive a unique bank-card number generated by the
plugin.
Requirements: - card numbers must be unique - card number must remain
unchanged after restart - card number must be stored persistently - a
player’s card is linked to their UUID - invalid/duplicate card numbers
must never be generated
The bank name should be:
“بانک جمهوری پوتیتو”
============================================================ 12. /money
pay ============================================================
Command:
/money pay
/money pay 4821-7392-1546-8273 10K
The sender pays the specified amount to the owner of the target card.
Requirements: 1. Validate card number. 2. Find target player account. 3.
Parse amount safely. 4. Check sender balance. 5. Prevent self-transfer
if configured as disallowed. 6. Remove money from sender. 7. Add money
to receiver. 8. Save both accounts safely. 9. Send Persian success
messages.
The transfer must be atomic.
Never remove money from the sender unless the receiver will receive it
successfully.
If the target card does not exist: - no money is removed.
If sender has insufficient funds: - no money is removed.
============================================================ 13. MONEY
AMOUNT FORMAT
The money parser must support:
1 1K 10K 100K 1M 10M 100M 1B 10B 100B
Meaning:
1K = 1,000 10K = 10,000 100K = 100,000
1M = 1,000,000 10M = 10,000,000 100M = 100,000,000
1B = 1,000,000,000 10B = 10,000,000,000 100B = 100,000,000,000
Parsing should be case-insensitive, so k/K, m/M, b/B may be accepted.
The parser should also support plain integer values where appropriate.
Reject: - negative amounts - zero amounts - invalid text - overflow -
values larger than the internal supported maximum
Do not use floating-point parsing.
============================================================ 14. CITY
TREASURIES ============================================================
There are exactly three cities initially:
شهر 1 شهر 2 شهر 3
Each city has an independent treasury.
خزانه شهر 1: 500K خزانه شهر 2: 2M خزانه شهر 3: 75M
City treasury money is separate from personal player-bank money.
Do not mix these balances.
Each treasury must persist across server restarts.
============================================================ 15. PLAYER
TREASURY VIEW COMMAND
Normal players can view treasury balances.
The treasury commands MUST use ASCII/Finglish command names so they are
easy to type and reliable in Minecraft command parsing.
Required commands:
/khazane shahr1
/khazane shahr2
/khazane shahr3
The player-facing output and usage/help text must remain Persian.
IMPORTANT: Every command and subcommand must provide in-game
TAB-completion/autocomplete. When the player types a command and presses
TAB, the game must show the valid next options so the player can select
them instead of having to remember or manually type them.
Examples:
/khazane → shahr1, shahr2, shahr3
/khazane shahr1 → add (only if the player has the required admin
permission; otherwise no admin-only option should be suggested)
Players can VIEW the treasury.
Normal players cannot add/remove treasury money.
Example output:
خزانه شهر 1 موجودی: 500K
============================================================ 16. ADMIN
TREASURY COMMANDS
Admins have access to treasury management.
They must be able to add money to a selected city’s treasury.
Required command structure:
/khazane shahr1 add 100K
/khazane shahr2 add 1M
/khazane shahr3 add 10M
Also support the same command structure for viewing a treasury:
/khazane shahr1
/khazane shahr2
/khazane shahr3
TAB-completion is REQUIRED for every part of this command. The player
must be able to press TAB to receive valid suggestions for city names,
admin subcommands, and valid argument positions. Amount is a free-form
money value and must be validated by the command parser; do not suggest
unsafe or invalid values.
Permissions must be used so normal players cannot perform admin
operations.
Do not allow negative additions or malformed amounts.
All changes must be persisted.
The exact final admin command aliases can be configurable.
============================================================ 17. ORE
PRICE ADMIN COMMAND
Admins need a money/ore price management command.
The REQUIRED command structure is:
/money price
Initial ores available for selection:
- iron
- diamond
- netherite
- copper
- gold
/money price diamond 6
The command MUST provide full in-game TAB-completion/autocomplete:
/money → card, pay, price
/money price → iron, diamond, netherite, copper, gold
/money price diamond → valid price argument position
Only ores that are actually configured/supported may be suggested.
Admin-only subcommands must only appear in TAB-completion for players
who have the required permission.
Admin must also be able to change existing prices.
Changing a price must update the active economy immediately and persist
it.
Do not require a server restart for normal price changes unless
technically unavoidable.
============================================================ 18. ORE
PRICE INFORMATION
If an admin sets:
Diamond = 6
then the player’s Diamond item information should display its current
value.
Diamond ارزش: 6$
If the admin changes it to 10, the displayed active value must become
10$.
The economy must always use the current configured price.
============================================================ 19.
SCOREBOARD COMPATIBILITY
The plugin must expose the player’s current money in a way that a
scoreboard plugin can read.
Example scoreboard:
━━━━━━━━━━━━━━ POTITO ━━━━━━━━━━━━━━ پول: 250K ━━━━━━━━━━━━━━
Do NOT force the plugin to replace or control an existing scoreboard
unless explicitly configured.
Instead, expose: - player balance getter - formatted balance - raw
numeric balance
A scoreboard or another plugin should be able to request the current
value.
If a Vault-style integration is practical, support it without making
Vault mandatory unless required by the final implementation.
20. INTERNAL/EXTERNAL ECONOMY API
Keep one economy only. Expose a clean public API for other plugins to read/add/remove/set/transfer player balances and read/add/remove/set city treasuries. Use UUID + long integer units; atomic, thread-safe, persistent operations; reject negative/overflow values; return success/failure; never create/delete money accidentally. External plugins must use the same Potato Bank balances/storage, never a second economy. Future robbery integration must use this same treasury service; do not hard-code knowledge of a robbery plugin.
============================================================ 26. PERSIAN
PLAYER-FACING LANGUAGE
All player-facing text must be Persian.
Examples:
موجودی بانک شما: پرداخت با موفقیت انجام شد. موجودی شما کافی نیست. شماره
کارت پیدا نشد. این مقدار پول معتبر نیست. فضای کافی در اینونتوری ندارید.
این عملیات فقط برای ادمین است. قیمت الماس تغییر کرد. موجودی خزانه شهر ۱:
فروش با موفقیت انجام شد. خرید با موفقیت انجام شد.
Messages must be configurable.
Commands/permission nodes can use ASCII-safe internal identifiers when
necessary, but player-facing descriptions, GUI labels, errors, and
outputs should be Persian.
============================================================ 27. DATA
MODEL ============================================================
Use a clean persistent data model.
Suggested player record:
PlayerAccount: - UUID - cardNumber - balance
Suggested city record:
CityTreasury: - cityId - balance
Suggested ore record:
OrePrice: - material - unitPrice - optional sell transaction
quantities - optional buy transaction quantities
Do not use player names as the primary account identifier.
UUID is authoritative.
============================================================ 28.
CONFIGURATION
Provide a clear configuration file.
It must allow configuration of: - GUI title - GUI slots - GUI icons -
messages - permissions - city names - city IDs - ore prices -
transaction values - supported materials - card-number format - economy
limits - language/messages
Example conceptual configuration:
cities: city1: name: “شهر 1” city2: name: “شهر 2” city3: name: “شهر 3”
ores: diamond: material: DIAMOND unit-price: 6 iron: material: IRON
unit-price: 1 gold: material: GOLD_INGOT unit-price: 3 copper: material:
COPPER_INGOT unit-price: 1 netherite: material: NETHERITE_INGOT
unit-price: 100
These values are examples only and must not be treated as final prices.
============================================================ 29.
IMPORTANT: NO HIDDEN ASSUMPTIONS
Do not invent additional economy features such as: - loans - interest -
taxes - ATM system - offline fees - bank limits - debt - gambling -
automatic city taxes
unless they are explicitly added later.
Build the current requested system only.
============================================================ 30. ERROR
HANDLING ============================================================
Handle: - invalid command syntax - invalid card number - card not
found - insufficient balance - insufficient items - full inventory -
invalid amount - negative amount - zero amount - integer overflow -
invalid ore - invalid city - unauthorized admin command -
database/storage errors - duplicate transaction events - player
disconnect during transaction
Errors must be safe and Persian.
============================================================ 31.
SECURITY / EXPLOIT PREVENTION
The plugin must specifically prevent: - double-click money duplication -
shift-click duplication - drag duplication - reconnect duplication -
restart duplication - negative payment - integer overflow - fake card
numbers - duplicate card numbers - modifying GUI buttons - withdrawing
items from decorative GUI slots - paying a nonexistent card - paying
without enough money - selling without enough items - creating money
through failed transactions - destroying money through failed
transactions
============================================================ 32. FINAL
FUNCTIONAL FLOW
PLAYER BANK:
/money → view balance
/money card → view bank card
/money pay → transfer money
/money price → admin: set/change ore price
All commands MUST have in-game TAB-completion/autocomplete. The plugin
must register command suggestions through the appropriate Paper/Bukkit
command completion system. Suggestions must be context-aware, permission-
aware, and limited to valid commands, subcommands, ores, cities, and
other safe argument choices.
Examples:
/money → card, pay, price
/money pay → valid/known bank-card choices where safely available
/money price → iron, diamond, netherite, copper, gold
/khazane → shahr1, shahr2, shahr3
/khazane shahr1 → add (only for authorized admins)
Do not require players to memorize command names when a valid TAB
suggestion can be provided by the game.
All internal command names must be ASCII/Finglish. Player-facing
messages, help text, GUI labels, errors, and outputs remain Persian.
STONECUTTER:
Right-click Stonecutter → بانک پوتیتو → SELL / BUY
SELL: 1K / 10K / 100K → configured ore → remove ore → add money to
player’s bank
BUY: 1K / 10K / 100K → remove money from player’s bank → give configured
ore
CITY TREASURY:
/khazane shahr1 → view City 1 treasury
/khazane shahr2 → view City 2 treasury
/khazane shahr3 → view City 3 treasury
Admin: → add/manage treasury money
ORE PRICE:
Admin: → set/change ore price
Player: → hover configured ore → see current value in lore
EXTERNAL PLUGINS:
Other plugin → Potato Bank API → read/add/remove player money →
read/add/remove city treasury
SCOREBOARD:
Scoreboard plugin → Potato Bank API → read current player balance →
display it
============================================================ 33. QUALITY
MONEY TOP / CITY TOP
/money top: show the TOP 10 richest players using the actual persistent balances, sorted highest to lowest. Show rank, player name and formatted balance; Persian output; configurable messages; no duplicate accounts; offline accounts may be included according to stored data.
/money city top: show City 1/2/3 treasury ranking using the same real city treasuries, sorted highest to lowest. Do not create a second ranking balance. Both commands require TAB completion, permission checks where configured, safe numeric formatting and persistence consistency. Rankings must read current data and never modify balances.
ORIGINAL POTATO ROBBERY SPECIFICATION
You are an expert Minecraft Paper/Purpur plugin developer.
Build a complete, production-ready Minecraft plugin named:
PotatoRobbery
The plugin must be delivered as a compiled, ready-to-use JAR file.
1. PLATFORM / BUILD REQUIREMENTS
Target platform:
- Paper / Purpur 1.21.x
- Java 21
- Maven
Main class:
ir.potatocraft.robbery.PotatoRobbery
Plugin name:
PotatoRobbery
Output:
PotatoRobbery.jar
The final result MUST be a compiled JAR, not only source code.
The plugin must compile successfully with:
mvn clean package
Do not leave TODOs, placeholders, missing classes, missing dependencies, or pseudo-code.
2. IMPORTANT DEPENDENCIES
This plugin MUST integrate with:
1. PotatoBank
2. LuckPerms
PotatoBank is the server's existing city treasury/economy plugin.
A PotatoBank JAR is provided separately and should be used as the API/dependency.
Do NOT create a second economy system.
Do NOT create a second city treasury system.
Do NOT store city treasury balances inside PotatoRobbery.
PotatoRobbery must use the existing PotatoBank API to read and modify city treasury balances.
The existing PotatoBank API provides functionality similar to:
getCityTreasury(String city)
addCityTreasury(String city, long amount)
removeCityTreasury(String city, long amount)
setCityTreasury(String city, long amount)
Use the actual API/classes/methods available in the provided PotatoBank JAR. Inspect the JAR if necessary instead of guessing class names.
For example, when a robbery successfully steals $1000 from City 2:
PotatoRobbery must call PotatoBank's treasury API and reduce City 2's treasury:
10000 -> 9000
Never create a fake local balance.
3. LUCKPERMS
Integrate with LuckPerms.
The Robbery Leader should receive/display a special prefix:
L_R
This should be compatible with the server's existing LuckPerms setup.
Do NOT destroy or overwrite existing rank groups such as OWNER, ADMIN, VIP, MEMBER, etc.
Use a temporary/controlled LuckPerms metadata/group mechanism.
When the player stops being a Robbery Leader, remove the robbery-specific L_R state.
Do not permanently modify the player's normal rank.
4. ROBBERY PARTY SYSTEM
PotatoRobbery has its own party system.
A player can create a robbery party:
/robbery create
The player who creates it becomes:
Robbery Leader / Owner
The Leader can:
/robbery invite
/robbery kick
/robbery info
/robbery leave
Only the Leader can invite and kick members.
/robbery invite Ali
The invited player joins the robbery party.
5. ROBBERY INFO
/robbery info
must display:
- Robbery Leader
- All current members
- Number of members
- Current robbery status
- Target city if a robbery is active
- Remaining robbery time if active
Robbery Leader: Mamad
Members:
- Mamad
- Ali
- Reza
Members: 3/3
Status: Active
Target City: 2
Time Remaining: 04:32
6. MINIMUM PLAYERS
A robbery cannot start unless there are at least 2 players in the robbery party.
If there is only one player:
"At least 2 players are required to start a robbery."
7. WHO CAN START A ROBBERY
IMPORTANT:
OPs/admins do NOT need to start robberies.
Only the Leader of that specific robbery party can start the robbery.
/robbery start 1
/robbery start 2
/robbery start 3
This starts a robbery against the selected city's treasury.
The Leader must be a member of the party.
8. CITY SYSTEM
Support at least:
City 1
City 2
City 3
Each robbery safe belongs to exactly one city.
Safe 1 -> City 1
Safe 2 -> City 2
Safe 3 -> City 3
The target city must be stored with the robbery.
The money must always be removed from the treasury of the selected city.
9. ADMIN / OP COMMANDS
Only OP/admin/authorized permission users should be able to configure robbery settings.
Commands:
/robbery time
/robbery safe add
/robbery safe remove
/robbery safe amount
/robbery spawn
Examples:
/robbery time 300
/robbery safe 1 add
/robbery safe 1 amount 1000
/robbery safe 2 add
/robbery safe 2 amount 2000
/robbery safe 3 add
/robbery safe 3 amount 5000
/robbery spawn 1
/robbery spawn 2
/robbery spawn 3
The robbery time is configurable.
300 seconds = 5 minutes.
10. ROBBERY SAFE
Robbery safes should visually use an Iron Block style, but MUST be distinguishable from normal Minecraft Iron Blocks.
Do not treat every normal Iron Block as a robbery safe.
A safe must be registered/configured by the plugin.
Store its location and city.
Only registered robbery safes can be robbed.
City 1 Safe
City 2 Safe
City 3 Safe
11. ROBBERY SAFE AMOUNT
Each city safe has a configurable robbery amount.
City 1 = $1000
City 2 = $2000
City 3 = $5000
If City 2 treasury contains:
$10000
and City 2 robbery amount is:
$2000
after a successful robbery:
$10000 -> $8000
The money MUST be removed from PotatoBank's City 2 treasury.
12. INSUFFICIENT TREASURY
If the city treasury does not contain enough money:
DO NOT allow the robbery payout.
Treasury = $500
Robbery amount = $1000
The robbery must fail safely.
Do not create money.
Do not allow a negative treasury.
Do not partially withdraw unless explicitly configured.
13. STARTING A ROBBERY
Party:
Mamad
Ali
Reza
Leader:
Mamad
Mamad executes:
/robbery start 2
The plugin checks:
- Leader is executing the command
- At least 2 members exist
- City 2 safe exists
- City 2 has enough treasury money
- No conflicting robbery is active for that safe
- Configuration is valid
If valid, the robbery starts.
14. GLOBAL ROBBERY ALERT
IMPORTANT:
The robbery alert MUST be shown to EVERY ONLINE PLAYER on the server.
NOT only robbery members.
When a robbery starts:
Play a police siren/alarm sound to all online players.
Display a Title/Subtitle to ALL online players for 5 seconds.
"⚠ ROBBERY ALERT ⚠"
"City 2 treasury is under attack!"
For City 1:
"City 1 treasury is under attack!"
For City 2:
"City 2 treasury is under attack!"
For City 3:
"City 3 treasury is under attack!"
The sound must also be global.
15. ROBBERY MAIN TIMER
When a robbery starts, the configured robbery duration begins.
/robbery time 300
The robbery has a 5-minute timer.
Display the remaining robbery time above/around the XP bar area.
ROBbery: 05:00
ROBbery: 04:59
ROBbery: 04:58
...
ROBbery: 00:01
ROBbery: 00:00
This main robbery timer should be visible ONLY to members of the active robbery party.
Do not show this timer to unrelated players.
Use a clean action-bar/boss-bar/XP-style display that looks similar to an XP timer.
16. ROBBERY TOOL
Create a special robbery tool:
"Safe Breaker"
This must be a custom plugin item.
Do not make normal sticks work.
Only the special Safe Breaker item can interact with robbery safes/protection blocks.
The item should have a unique identifier using PersistentDataContainer.
Give it a clear name and lore.
17. OPENING THE SAFE
A member of the active robbery party can Right Click the registered safe using the Safe Breaker.
Right Click starts the safe-opening process.
Only members of THAT robbery party can interact with that safe.
Other players cannot open it.
Players from another robbery cannot open it.
Players outside the robbery cannot open it.
OP status alone should NOT allow normal players to participate in the robbery unless they are members of the robbery party.
18. SAFE OPENING TIMER
When a valid player starts opening the safe:
Start a 30-second countdown.
Display the countdown above/around the XP bar area to the robbery members.
Safe opens in: 30
Safe opens in: 29
Safe opens in: 28
...
Safe opens in: 1
Safe opens in: 0
The countdown should update smoothly every second.
19. SAFE SUCCESS
When the 30-second safe-opening timer reaches zero:
1. Verify the robbery is still valid.
2. Verify the city treasury still contains enough money.
3. Remove the configured robbery amount from PotatoBank.
4. Give the stolen money to the robbery party according to the configured reward system.
5. Mark the safe as successfully robbed.
6. Play an appropriate success sound.
7. Display a success message.
IMPORTANT:
The treasury withdrawal must happen only after successful completion.
Do NOT withdraw money when the safe-opening timer starts.
20. ROBBERY REWARD
The stolen amount comes from the city treasury.
The stolen money should be distributed to the active robbery members.
Implement a configurable reward mode.
Default mode:
Split the stolen amount equally among all current robbery members.
Stolen amount = $1000
Members = 2
Each receives $500.
If there are 4 members:
Each receives $250.
Use integer-safe calculations.
Do not create money from nothing.
The reward should use the server's economy system if PotatoBank exposes one; otherwise implement the safest compatible payout mechanism without changing the city treasury logic.
21. LEADER DEATH
VERY IMPORTANT:
If the Robbery Leader dies while the robbery is active:
The ENTIRE robbery immediately ends.
Cancel:
- Main robbery timer
- Safe-opening timer
- Active robbery state
- Robbery interactions
- Robbery protection state
Do NOT withdraw money if the safe was not successfully opened.
Remove robbery leader/member temporary state.
22. ROBBERY MANUAL END
The Robbery Leader can manually end the robbery:
/robbery end
This immediately ends the active robbery.
Cancel all active timers.
Remove active robbery state.
If the robbery has not successfully completed, do not withdraw money.
23. ROBBERY TIME EXPIRES
When the main robbery timer reaches zero:
The robbery ends automatically.
No additional safe-opening action should be allowed.
Cancel any active robbery operation.
If the robbery has not successfully completed, do not withdraw money.
24. RETURN / SPAWN
IMPORTANT:
ONLY players who were members of THAT robbery party should be returned.
When the robbery ends, teleport the members of that robbery to the configured robbery spawn for the target city.
City 1:
/robbery spawn 1
City 2:
/robbery spawn 2
City 3:
/robbery spawn 3
Players who were NOT members of the robbery must never be teleported.
Do not teleport the entire server.
25. PROTECTED BEDROCK SYSTEM
Create a special robbery protection Bedrock block.
It must be distinguishable from normal Bedrock using a unique PersistentDataContainer identifier.
When the special Bedrock is placed:
Create a 3x3 surrounding structure using special robbery Iron Blocks.
These Iron Blocks must be identifiable separately from normal Iron Blocks.
Do NOT permanently replace unrelated blocks.
IMPORTANT:
Before creating the 3x3 structure, store the original blocks/locations.
When the protection is destroyed:
Restore the exact original blocks.
Never delete or overwrite the player's existing world blocks permanently.
26. BEDROCK HEALTH
The special protection Bedrock has:
100 health/power.
Display above it:
"Power: 100"
Also display an XP-style progress bar.
When hit with the Safe Breaker:
100 -> 90 -> 80 -> 70 -> ...
Each valid hit removes exactly 10 power.
When power reaches 0:
- Break the protection Bedrock
- Remove/restore the temporary 3x3 Iron structure
- Play an explosion/break sound
- Update the hologram/progress display
- Continue the robbery logic
Do NOT cause destructive real-world explosion damage to nearby builds.
Only simulate the explosion visually/audio-wise unless explicitly configured otherwise.
27. HOLOGRAM
The protection block should display a floating text/hologram.
Power: 100
When damaged:
Power: 90
Power: 80
Power: 70
...
Power: 0
Use a stable implementation that does not create thousands of entities.
Clean up holograms when the robbery ends.
28. BLOCK RESTORATION
When the robbery protection system creates temporary Iron Blocks:
Store every original block state.
When the protection ends:
Restore every original block exactly.
Do not permanently destroy:
- chests
- doors
- blocks
- decorations
- redstone
- player builds
The system must be safe.
29. ROBBERY ACCESS CONTROL
Only members of the currently active robbery party can:
- Interact with the robbery safe
- Use the Safe Breaker on the robbery protection
- Damage the robbery protection
- Continue the robbery operation
Everyone else should receive a message such as:
"You are not a member of this robbery."
30. MULTIPLE ROBBERIES
Support multiple cities safely.
Do not allow two different parties to rob the same city safe at the same time.
Party A -> City 1
Party B -> City 2
Both can operate independently if the configuration allows it.
But:
Party A -> City 1
Party B -> City 1
must NOT be allowed simultaneously.
31. DATA STORAGE
Store configuration and robbery safe data in YAML files.
plugins/PotatoRobbery/config.yml
plugins/PotatoRobbery/safes.yml
plugins/PotatoRobbery/data.yml
Store:
- Safe locations
- City IDs
- Robbery amounts
- Robbery duration
- Spawn locations
- Other configurable settings
Do not store PotatoBank treasury balances locally.
32. RELOAD
Add:
/robbery reload
Permission:
potatorobbery.admin
Reload configuration safely without restarting the server.
Do not corrupt active robberies.
33. PERMISSIONS
Suggested permissions:
potatorobbery.admin
potatorobbery.create
potatorobbery.use
potatorobbery.safe
potatorobbery.reload
Normal players should only need the appropriate player permissions.
Admin configuration commands must require:
potatorobbery.admin
OPs should automatically have admin access through Bukkit permission behavior.
34. COMMAND TAB COMPLETION
Implement tab completion for all commands.
Examples:
/robbery
/robbery start
Should suggest:
1
2
3
For:
/robbery safe
Suggest:
1
2
3
For:
/robbery invite
Suggest online players.
35. CONFIGURATION
Make messages configurable.
Make sounds configurable.
Make robbery duration configurable.
Make safe opening time configurable, default:
30 seconds.
Make robbery amounts configurable.
Make reward distribution configurable.
Make titles configurable.
Make colors configurable.
Use MiniMessage or modern Paper-compatible formatting where appropriate.
36. PERSISTENT DATA
Use PersistentDataContainer for custom items and custom blocks.
Examples:
safe_breaker
robbery_safe
robbery_bedrock
robbery_iron
Do not identify custom blocks only by their material.
A normal Minecraft Iron Block must NEVER accidentally become a robbery safe.
A normal Minecraft Bedrock must NEVER accidentally become robbery protection.
37. CRASH / RESTART SAFETY
Handle server shutdown safely.
If the server restarts during an active robbery:
- Cancel the robbery safely.
- Restore temporary blocks if necessary.
- Remove temporary holograms/entities.
- Do not withdraw money incorrectly.
- Do not duplicate rewards.
Prevent duplication exploits.
38. EXPLOIT PREVENTION
Prevent:
- Double payouts
- Double safe openings
- Multiple simultaneous openings of one safe
- Negative treasury balances
- Reward duplication
- Fake Safe Breaker items
- Normal sticks being accepted
- Normal Iron Blocks being treated as safes
- Normal Bedrock being treated as robbery protection
- Players joining/leaving to duplicate rewards
- Repeated right-click exploits
- Disconnect/reconnect reward exploits
Use server-side validation for every important action.
39. USER EXPERIENCE
The system should feel like a professional Minecraft server robbery system.
Use:
- Titles
- Subtitles
- Action bars
- Sounds
- Countdown timers
- Clear messages
- Holograms
- Progress bars
The global robbery alert must be dramatic.
TITLE:
⚠ ROBBERY ALERT ⚠
SUBTITLE:
City 2 treasury is under attack!
Play a police siren to ALL online players.
Display this alert for approximately 5 seconds.
40. IMPORTANT DISTINCTION BETWEEN TIMERS
There are TWO separate timers:
A) Main Robbery Timer
Configured by admin:
/robbery time 300
5 minutes.
This timer controls how long the entire robbery remains active.
Visible only to robbery members.
B) Safe Opening Timer
Default:
30 seconds.
This starts when a robbery member Right Clicks the safe with the Safe Breaker.
Visible only to robbery members.
Do NOT confuse these two timers.
41. COMPLETE EXAMPLE
Admin configuration:
/robbery time 300
/robbery safe 2 add
/robbery safe 2 amount 1000
/robbery spawn 2
City 2 treasury:
$10000
Players:
Mamad
Ali
Mamad executes:
/robbery create
Mamad becomes Leader.
Mamad:
/robbery invite Ali
Now there are 2 members.
Mamad executes:
/robbery start 2
The plugin:
1. Checks minimum 2 members.
2. Checks City 2 safe.
3. Checks City 2 treasury.
4. Starts the 5-minute robbery timer.
5. Plays police siren to EVERY online player.
6. Shows a global title for 5 seconds:
"⚠ ROBBERY ALERT ⚠"
"City 2 treasury is under attack!"
7. Shows the robbery timer to Mamad and Ali.
Mamad goes to the safe.
Mamad Right Clicks with Safe Breaker.
Safe opening timer:
30
29
28
...
1
0
When it reaches 0:
PotatoBank City 2 treasury:
$10000 -> $9000
The $1000 stolen amount is distributed to the robbery members.
The robbery succeeds.
The robbery ends.
Only Mamad and Ali are teleported to:
City 2 Robbery Spawn.
Other online players are NOT teleported.
## 52. CUSTOM ITEM/BLOCK IDENTIFICATION
Every custom Robbery item/block MUST have a unique PersistentDataContainer identifier.
Required identifiers:
robbery_safe
safe_breaker
robbery_bedrock
robbery_iron
The plugin MUST NOT identify these objects only by their material.
For example:
* Normal Iron Block = NOT a Robbery Safe
* Normal Bedrock = NOT Robbery Bedrock
* Normal Stick = NOT Safe Breaker
Only objects created by the plugin with the correct PersistentDataContainer data can be used by the Robbery system.
## 53. GIVE COMMAND PERMISSION
The give commands must require:
potatorobbery.admin
OPs should automatically have access through the normal Bukkit permission system.
Normal players must NOT be able to use:
/robbery give
If a normal player attempts to use it, show a Persian message:
"شما اجازه دریافت آیتمهای رابری را ندارید."
## 54. GIVE COMMAND TAB COMPLETION
Implement tab completion.
When typing:
/robbery give
suggest:
safe
breaker
bedrock
iron
When typing:
/robbery give safe
suggest online player names.
The command names remain Finglish/English-style, but all explanations and messages shown to players MUST be Persian.
## 55. GIVE COMMAND DEFAULT AMOUNT
Default amount:
1
Also support an optional amount:
/robbery give safe
/robbery give breaker
/robbery give bedrock
/robbery give iron
/robbery give iron Mamad 9
This gives Mamad 9 Robbery Iron Blocks.
Validate the amount safely.
Do not allow:
* Zero
* Negative numbers
* Invalid numbers
* Extremely large unsafe values
## 56. CUSTOM ITEM INFORMATION
Each custom object should have a clear Persian name.
Examples:
Robbery Safe:
"گاوصندوق رابری"
Safe Breaker:
"چوب گاوصندوقشکن"
Robbery Bedrock:
"محافظ رابری"
Robbery Iron:
"بلوک آهنی رابری"
Add useful Persian lore explaining their purpose.
The actual internal identifiers must remain technical and stable; only the player-facing names and descriptions should be Persian.
## 57. IMPORTANT
The custom Robbery Safe obtained using:
/robbery give safe
is NOT automatically registered to a city.
It is simply the special Safe item/block.
The administrator must place/configure it using the appropriate safe setup system.
Likewise:
/robbery give bedrock
only gives the special Robbery Bedrock.
It does not automatically activate a robbery.
The Robbery system must distinguish between:
1. Custom item/block obtained with /robbery give
2. A configured/placed Robbery Safe
3. An active Robbery protection structure
Do not confuse these states.## 58. CUSTOM ROBBERY ITEMS/BLOCKS — ADMIN GIVE SYSTEM
Add a complete admin-only system for obtaining all custom Robbery items and blocks.
The following command must be implemented:
/robbery give [player] [amount]
Supported types:
* safe
* breaker
* bedrock
* iron
Examples:
/robbery give safe
/robbery give breaker
/robbery give bedrock
/robbery give iron
The command should give the item to the command sender when no player is specified.
Also support:
/robbery give safe
/robbery give breaker
/robbery give bedrock
/robbery give iron
Also support an optional amount:
/robbery give safe
/robbery give breaker
/robbery give bedrock
/robbery give iron
Default amount must be 1.
## 59. CUSTOM ROBBERY OBJECTS
The plugin must provide these four custom objects:
1. Robbery Safe
Material appearance:
IRON_BLOCK
Persian display name:
"گاوصندوق رابری"
2. Safe Breaker
Material:
STICK
Persian display name:
"چوب گاوصندوقشکن"
3. Robbery Bedrock
Material:
BEDROCK
Persian display name:
"محافظ رابری"
4. Robbery Iron
Material:
IRON_BLOCK
Persian display name:
"بلوک آهنی رابری"
These objects MUST contain unique PersistentDataContainer identifiers.
Required identifiers:
robbery_safe
safe_breaker
robbery_bedrock
robbery_iron
The plugin MUST NEVER identify these objects only by their Minecraft material.
A normal:
IRON_BLOCK
BEDROCK
STICK
must never automatically become a Robbery object.
## 60. ADMIN-ONLY ACCESS
Only users with:
potatorobbery.admin
may use:
/robbery give
OP players must automatically have access through the normal Bukkit permission system.
Normal players must receive a Persian error message:
"شما اجازه دریافت آیتمها و بلاکهای رابری را ندارید."
Never display an English permission error.
## 61. TAB COMPLETION
Implement complete tab completion.
For:
/robbery give
suggest:
safe
breaker
bedrock
iron
For:
/robbery give safe
suggest online player names.
For:
/robbery give safe Player
suggest valid amount input where appropriate.
## 62. VALIDATION
Validate all arguments.
Invalid type:
"نوع آیتم رابری وارد شده صحیح نیست."
Invalid player:
"بازیکن موردنظر پیدا نشد."
Invalid amount:
"تعداد وارد شده صحیح نیست."
Amount must be greater than 0.
Prevent unsafe or excessively large amounts.
## 63. CUSTOM ITEM LORE
Give every custom object clear Persian lore.
Robbery Safe:
"گاوصندوق رابری"
"برای سیستم سرقت خزانه استفاده میشود."
Safe Breaker:
"چوب گاوصندوقشکن"
"برای باز کردن و آسیب زدن به تجهیزات رابری استفاده میشود."
Robbery Bedrock:
"محافظ رابری"
"بلاک محافظ مخصوص سیستم رابری."
Robbery Iron:
"بلوک آهنی رابری"
"بخشی از ساختار محافظ رابری."
## 64. IMPORTANT DISTINCTION
The /robbery give commands ONLY give the custom objects.
They must NOT automatically:
* Register a safe to a city
* Start a robbery
* Activate a robbery
* Create a 3×3 structure
* Withdraw money
* Modify PotatoBank
* Teleport players
* Start any timer
For example:
/robbery give safe
only gives the custom Robbery Safe item.
The administrator must separately configure/place/register the safe using the appropriate robbery setup commands.
## 65. PLACEMENT AND IDENTIFICATION
When a custom Robbery Safe is placed, the placed block must retain its Robbery identity.
The same applies to:
* Robbery Bedrock
* Robbery Iron
The plugin must reliably recognize placed custom blocks using PersistentDataContainer or another safe server-side identification method.
Normal Minecraft blocks with the same material must remain completely unaffected.
## 66. LANGUAGE REQUIREMENT
All player-facing messages related to this system MUST be Persian.
Commands remain Finglish/English-style.
Example command:
/robbery give safe
Persian response:
"گاوصندوق رابری با موفقیت دریافت شد."
/robbery give safe Ali 5
Persian response:
"۵ عدد گاوصندوق رابری به Ali داده شد."
Do NOT display raw English Bukkit/Paper errors to players.
Do NOT display Java exceptions to players.
Internal technical errors may be logged to the server console, but player-facing messages must remain Persian.
FINAL UNIFIED BUILD/LANGUAGE RULES
The final implementation is ONE plugin/JAR only: no PotatoBank.jar + PotatoRobbery.jar, no external PotatoBank dependency, no plugin-to-plugin Bank/Robbery connection, no duplicated economy/treasury. Keep clean internal services/classes as desired.
Paper/Purpur 1.21.x, Java 21, Maven, production-ready code; no TODOs/placeholders/pseudocode/missing dependencies. Register all commands, listeners, configs and tab completion. Persist balances, cards, treasuries, prices and robbery state safely across restart/reload/disconnect. Never show raw Java/Bukkit/API exceptions to players; technical details may go to console.
All commands are ASCII/Finglish; all player-facing messages, GUI labels, titles, action bars, help and errors are Persian and configurable through a centralized messages system. /robbery join must support pending invitations, expiry, party membership and capacity checks. Admin-only /robbery give must have permission and context-aware TAB completion.
Custom robbery objects (Safe, Safe Breaker, Robbery Bedrock, Robbery Iron and any configured custom items/blocks) must use persistent identification such as PDC, correct lore/name, validation, admin-only give access, safe placement/break rules, and must never be confused with normal vanilla blocks/items.
Final testing must cover bank creation/card stability/payments, Stonecutter SELL/BUY for all configured ores, inventory/GUI exploits, price changes, city treasury operations, /money top and /money city top, robbery party/invites/timers/safes/treasury withdrawal/rewards/cancellation/leader death/teleport/restoration, persistence, restart/disconnect, spam/duplicate events and all commands/TAB completion.
📄
pasted-code-1791447248291.txt
txt
88 lines
▶
============================================================
ADDITION — SCOREBOARD MONEY DISPLAY
============================================================
IMPORTANT:
Add this feature to the existing TAB scoreboard configuration.
The player's current money must be displayed directly inside the
server scoreboard.
Use the SAME real Potato Bank economy balance that is already used
by the plugin.
Do NOT create a second economy.
Do NOT create a separate balance.
Do NOT hard-code a money value.
Do NOT use a fake/static placeholder.
The scoreboard must continuously show the player's CURRENT balance.
Example:
&3&l💰 Money
&e$%PLAYER_MONEY%
The value must update automatically whenever the player's balance
changes.
For example:
- Player receives money → scoreboard updates.
- Player spends money → scoreboard updates.
- Player sells an item → scoreboard updates.
- Player buys an item → scoreboard updates.
- /money pay is completed → scoreboard updates.
- Another internal system adds/removes money → scoreboard updates.
The scoreboard value must always read from the ONE shared internal
economy/data layer of this plugin.
If the plugin already provides a valid TAB/PlaceholderAPI-compatible
money placeholder, use that existing placeholder.
If no valid money placeholder currently exists, implement a proper
TAB-compatible placeholder that returns the player's real current
Potato Bank balance.
The placeholder must work correctly inside NEZNAMY TAB's scoreboard.
Example final TAB scoreboard section:
- "&3&l💰 Money"
- "&e$%potatobank_balance_formatted%"
The exact placeholder name may be chosen by the developer, but it
must be implemented and actually return the real player's balance.
The displayed money should support formatted values such as:
$0
$500
$1K
$25K
$1M
$250M
Do not change or remove any other scoreboard lines.
Keep all existing:
- Player
- PlayTime
- Ping
- Server address
- Season
- decorative lines
Only make the Money section correctly display the player's real
current balance.
IMPORTANT:
The scoreboard money value and /money command MUST always show the
same balance.
There must never be a situation where /money shows one amount while
the scoreboard shows another amount.
============================================================
END OF SCOREBOARD MONEY DISPLAY ADDITION
============================================================
ساخت پروژه Maven و پیکربندی فارسی؛ اقتصاد پایدار، کارت بانکی و API مشترک.
افزودن GUI بانک، فرمانها، سنگبر سفارشی و placeholder موجودی.
افزودن سیستم سرقت چندشهری، گروه، گاوصندوق، cooldown سراسری و بازگشت بازیکنان.
پروژه یکپارچهی Maven برای PotatoBank و سامانهی سرقت ساخته شد.
اقتصاد، کارتهای بانکی، خزانهی سه شهر و پرداختها از یک لایهی ذخیرهسازی مشترک استفاده میکنند؛ API عمومی هم برای دسترسی افزونههای دیگر فراهم است.
بانک شامل GUI سنگبر اختصاصی، گزینههای خرید و فروش ۱۰، ۱هزار، ۱۰هزار و ۱۰۰هزار، فرمانهای
/moneyو/khazaneو تکمیل خودکار است. سنگبر معمولی Vanilla باقی میماند.سرقت شامل گروه و دعوت، گاوصندوقهای شهری، سلامت و زمان بازشدن، تقسیم جایزه، بازگشت به محل شهر، مرگ رهبر و cooldown سراسری و پایدار ۹۰ دقیقهای است.
placeholder موجودی زندهی PlaceholderAPI، بهشکل
%potatobank_balance_formatted%و%potatobank_balance%، اضافه شد.
فایلهای Maven، تنظیمات و کدهای افزونه ایجاد شدند.
package ir.potatocraft;
import com.cryptomorin.xseries.XMaterial;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
public final class PotatoPlugin extends JavaPlugin {
private EconomyService economy;
private PotatoBankAPI api;
private BankModule bank;
private RobberyModule robbery;
private NamespacedKey itemKey;
@Override
public void onEnable() {
saveDefaultConfig();
economy = new EconomyService(this);
api = new PotatoBankAPI(economy);
itemKey = new NamespacedKey(this, "potato_item");
bank = new BankModule(this, economy);
robbery = new RobberyModule(this, economy);
getServer().getPluginManager().registerEvents(bank, this);
getServer().getPluginManager().registerEvents(robbery, this);
getCommand("money").setExecutor(bank);
getCommand("money").setTabCompleter(bank);
getCommand("khazane").setExecutor(bank);
getCommand("khazane").setTabCompleter(bank);
getCommand("stonecutter").setExecutor(bank);
getCommand("stonecutter").setTabCompleter(bank);
getCommand("robbery").setExecutor(robbery);
getCommand("robbery").setTabCompleter(robbery);
if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) new PotatoPlaceholder(this, economy).register();
getLogger().info("PotatoBank و سامانه سرقت فعال شدند.");
}
@Override
public void onDisable() {
if (robbery != null) robbery.shutdown();
if (bank != null) bank.shutdown();
}
public EconomyService economy() { return economy; }
public PotatoBankAPI getAPI() { return api; }
NamespacedKey itemKey() { return itemKey; }
String message(String key) { return getConfig().getString("messages." + key, "&cخطا").replace('&', '§'); }
String cityName(String city) { return getConfig().getString("cities." + city, city); }
static org.bukkit.Material material(String name) { return XMaterial.matchXMaterial(name).map(XMaterial::parseMaterial).orElse(null); }
}