diff --git a/.gradle/8.8/executionHistory/executionHistory.bin b/.gradle/8.8/executionHistory/executionHistory.bin index a51829b..3ed939d 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.bin and b/.gradle/8.8/executionHistory/executionHistory.bin differ diff --git a/.gradle/8.8/executionHistory/executionHistory.lock b/.gradle/8.8/executionHistory/executionHistory.lock index fef9fbd..81fa61d 100644 Binary files a/.gradle/8.8/executionHistory/executionHistory.lock and b/.gradle/8.8/executionHistory/executionHistory.lock differ diff --git a/.gradle/8.8/fileHashes/fileHashes.bin b/.gradle/8.8/fileHashes/fileHashes.bin index a984c04..cfcce41 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.bin and b/.gradle/8.8/fileHashes/fileHashes.bin differ diff --git a/.gradle/8.8/fileHashes/fileHashes.lock b/.gradle/8.8/fileHashes/fileHashes.lock index d457a37..96d28f6 100644 Binary files a/.gradle/8.8/fileHashes/fileHashes.lock and b/.gradle/8.8/fileHashes/fileHashes.lock differ diff --git a/.gradle/8.8/fileHashes/resourceHashesCache.bin b/.gradle/8.8/fileHashes/resourceHashesCache.bin index c367ad3..a98e975 100644 Binary files a/.gradle/8.8/fileHashes/resourceHashesCache.bin and b/.gradle/8.8/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 950d49d..180fbe9 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/build/classes/java/main/CoswayUtil/BankingSystem.class b/build/classes/java/main/CoswayUtil/BankingSystem.class index 3b9bc9f..6cb1b22 100644 Binary files a/build/classes/java/main/CoswayUtil/BankingSystem.class and b/build/classes/java/main/CoswayUtil/BankingSystem.class differ diff --git a/build/classes/java/main/CoswayUtil/CheckCommand.class b/build/classes/java/main/CoswayUtil/CheckCommand.class index 978c666..8311673 100644 Binary files a/build/classes/java/main/CoswayUtil/CheckCommand.class and b/build/classes/java/main/CoswayUtil/CheckCommand.class differ diff --git a/build/libs/CoswayUtil-1.13-RELEASE.jar b/build/libs/CoswayUtil-1.13-RELEASE.jar index 4a7c4f0..0fb0e01 100644 Binary files a/build/libs/CoswayUtil-1.13-RELEASE.jar and b/build/libs/CoswayUtil-1.13-RELEASE.jar differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect$1.class.uniqueId21 b/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect$1.class.uniqueId21 deleted file mode 100644 index a495b1f..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect$1.class.uniqueId21 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect.class.uniqueId29 b/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect.class.uniqueId29 deleted file mode 100644 index 43cc5e7..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/BlackholeEffect.class.uniqueId29 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId13 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId4 similarity index 100% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId13 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$1.class.uniqueId4 diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId2 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId5 similarity index 94% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId2 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId5 index a4ffb8d..994d828 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId2 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$2.class.uniqueId5 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId23 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId1 similarity index 91% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId23 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId1 index 4bc5c75..66f97ab 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId23 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$1.class.uniqueId1 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId11 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId3 similarity index 93% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId11 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId3 index b4344f5..419bf5e 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId11 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$2.class.uniqueId3 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId6 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId6 deleted file mode 100644 index e987357..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$3.class.uniqueId6 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId17 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId2 similarity index 93% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId17 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId2 index 994cf6f..721a7b7 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId17 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield$4.class.uniqueId2 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId27 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId6 similarity index 87% rename from build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId27 rename to build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId6 index db4aabc..3423ee5 100644 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId27 and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil$AnchorShield.class.uniqueId6 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId0 new file mode 100644 index 0000000..c522da6 Binary files /dev/null and b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId0 differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId16 b/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId16 deleted file mode 100644 index 06d1538..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/CoswayUtil.class.uniqueId16 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$1.class.uniqueId15 b/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$1.class.uniqueId15 deleted file mode 100644 index 8dc28e1..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$1.class.uniqueId15 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$2.class.uniqueId28 b/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$2.class.uniqueId28 deleted file mode 100644 index 07e6d9f..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator$2.class.uniqueId28 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator.class.uniqueId32 b/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator.class.uniqueId32 deleted file mode 100644 index 9f0d205..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/FireflySimulator.class.uniqueId32 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/GiveWandCommand.class.uniqueId20 b/build/tmp/compileJava/compileTransaction/stash-dir/GiveWandCommand.class.uniqueId20 deleted file mode 100644 index 5746ceb..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/GiveWandCommand.class.uniqueId20 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/GravityGauntlet.class.uniqueId4 b/build/tmp/compileJava/compileTransaction/stash-dir/GravityGauntlet.class.uniqueId4 deleted file mode 100644 index d11403e..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/GravityGauntlet.class.uniqueId4 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/IlluminationWand.class.uniqueId22 b/build/tmp/compileJava/compileTransaction/stash-dir/IlluminationWand.class.uniqueId22 deleted file mode 100644 index 3eb5705..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/IlluminationWand.class.uniqueId22 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/LaunchStick.class.uniqueId7 b/build/tmp/compileJava/compileTransaction/stash-dir/LaunchStick.class.uniqueId7 deleted file mode 100644 index 446d49a..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/LaunchStick.class.uniqueId7 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms$1.class.uniqueId25 b/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms$1.class.uniqueId25 deleted file mode 100644 index 7f5fd4d..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms$1.class.uniqueId25 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms.class.uniqueId1 b/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms.class.uniqueId1 deleted file mode 100644 index 8eb3560..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MaceOfStorms.class.uniqueId1 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand$1.class.uniqueId24 b/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand$1.class.uniqueId24 deleted file mode 100644 index b7b9dbf..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand$1.class.uniqueId24 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand.class.uniqueId18 b/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand.class.uniqueId18 deleted file mode 100644 index af0dcbb..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/MobLevitationWand.class.uniqueId18 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio$1.class.uniqueId12 b/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio$1.class.uniqueId12 deleted file mode 100644 index 88fdf67..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio$1.class.uniqueId12 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio.class.uniqueId5 b/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio.class.uniqueId5 deleted file mode 100644 index 4cf4a9c..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/NoteStudio.class.uniqueId5 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge$1.class.uniqueId31 b/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge$1.class.uniqueId31 deleted file mode 100644 index b8ab886..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge$1.class.uniqueId31 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge.class.uniqueId26 b/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge.class.uniqueId26 deleted file mode 100644 index eff2eda..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/PhantomDodge.class.uniqueId26 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow$1.class.uniqueId30 b/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow$1.class.uniqueId30 deleted file mode 100644 index fef5727..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow$1.class.uniqueId30 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow.class.uniqueId8 b/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow.class.uniqueId8 deleted file mode 100644 index 7d55222..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/RapidFireBow.class.uniqueId8 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/ShadowStep.class.uniqueId3 b/build/tmp/compileJava/compileTransaction/stash-dir/ShadowStep.class.uniqueId3 deleted file mode 100644 index b63243a..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/ShadowStep.class.uniqueId3 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain$1.class.uniqueId14 b/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain$1.class.uniqueId14 deleted file mode 100644 index b2edd36..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain$1.class.uniqueId14 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain.class.uniqueId0 b/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain.class.uniqueId0 deleted file mode 100644 index bac3dcd..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/TreasureFountain.class.uniqueId0 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$1.class.uniqueId19 b/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$1.class.uniqueId19 deleted file mode 100644 index 1d9a4fa..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$1.class.uniqueId19 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$2.class.uniqueId9 b/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$2.class.uniqueId9 deleted file mode 100644 index ef78745..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract$2.class.uniqueId9 and /dev/null differ diff --git a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract.class.uniqueId10 b/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract.class.uniqueId10 deleted file mode 100644 index 6ce948a..0000000 Binary files a/build/tmp/compileJava/compileTransaction/stash-dir/WitherContract.class.uniqueId10 and /dev/null differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index 595689d..7364ad8 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/main/java/CoswayUtil/BankingSystem.java b/src/main/java/CoswayUtil/BankingSystem.java index cff35ca..98bbae1 100644 --- a/src/main/java/CoswayUtil/BankingSystem.java +++ b/src/main/java/CoswayUtil/BankingSystem.java @@ -15,6 +15,8 @@ import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataType; import org.bukkit.plugin.java.JavaPlugin; +import java.text.DecimalFormat; + public class BankingSystem implements Listener { private final CoswayUtil plugin; private final Economy economy; @@ -28,7 +30,7 @@ public class BankingSystem implements Listener { this.amountKey = new NamespacedKey(plugin, "check_amount"); Bukkit.getPluginManager().registerEvents(this, plugin); } - + private final DecimalFormat formatter = new DecimalFormat("#,###.##"); public void writeCheck(Player sender, String recipientName, double amount) { Player recipient = Bukkit.getPlayer(recipientName); if (recipient == null) { @@ -48,13 +50,17 @@ public class BankingSystem implements Listener { ItemStack check = new ItemStack(Material.PAPER); ItemMeta meta = check.getItemMeta(); if (meta != null) { + // Format the amount for better readability + String formattedAmount = formatter.format(amount); meta.setDisplayName(ChatColor.GOLD + "C.S.E.L. Check"); meta.getPersistentDataContainer().set(recipientKey, PersistentDataType.STRING, recipientName); meta.getPersistentDataContainer().set(amountKey, PersistentDataType.DOUBLE, amount); check.setItemMeta(meta); } + // Format the amount for better readability + String formattedAmount = formatter.format(amount); sender.getInventory().addItem(check); - sender.sendMessage(ChatColor.GREEN + "You have written a check for " + ChatColor.GOLD + "$" + amount + ChatColor.GREEN + " to " + recipientName); + sender.sendMessage(ChatColor.GREEN + "You have written a check for " + ChatColor.GOLD + "$" + formattedAmount + ChatColor.GREEN + " to " + recipientName); } @EventHandler diff --git a/src/main/java/CoswayUtil/CheckCommand.java b/src/main/java/CoswayUtil/CheckCommand.java index c40a857..a017851 100644 --- a/src/main/java/CoswayUtil/CheckCommand.java +++ b/src/main/java/CoswayUtil/CheckCommand.java @@ -2,6 +2,7 @@ package CoswayUtil; import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.command.Command; @@ -12,6 +13,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.persistence.PersistentDataType; +import java.text.DecimalFormat; import java.util.Arrays; public class CheckCommand implements CommandExecutor { @@ -30,19 +32,19 @@ public class CheckCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (!(sender instanceof Player player)) { - sender.sendMessage("Only players can use this command."); + sender.sendMessage(BankName()+ChatColor.RED+"Only players can use this command."); return true; } if (cmd.getName().equalsIgnoreCase("writecheck")) { if (args.length != 2) { - player.sendMessage("Usage: /writecheck "); + player.sendMessage(BankName()+ChatColor.GOLD+"Usage: /writecheck "); return true; } Player recipient = Bukkit.getPlayerExact(args[0]); if (recipient == null) { - player.sendMessage("Player not found!"); + player.sendMessage(BankName()+ChatColor.RED+"Player not found!"); return true; } @@ -50,29 +52,30 @@ public class CheckCommand implements CommandExecutor { try { amount = Double.parseDouble(args[1]); if (amount <= 0) { - player.sendMessage("Amount must be positive."); + player.sendMessage(BankName()+ChatColor.GOLD+"Amount must be positive."); return true; } } catch (NumberFormatException e) { - player.sendMessage("Invalid amount."); + player.sendMessage(BankName()+ChatColor.RED+"Invalid amount."); return true; } if (!econ.has(player, amount)) { - player.sendMessage("Insufficient funds."); + player.sendMessage(BankName()+ChatColor.RED+"Insufficient funds."); return true; } - + // Format the amount for better readability + String formattedAmount = formatter.format(amount); econ.withdrawPlayer(player, amount); player.getInventory().addItem(createCheck(recipient.getName(), amount)); - player.sendMessage("Check for " + amount + " written to " + recipient.getName() + "."); + sender.sendMessage(BankName()+ChatColor.GREEN + "You have written a check for " + ChatColor.GOLD + "$" + formattedAmount + ChatColor.GREEN + " to " + recipient.getName()); return true; } if (cmd.getName().equalsIgnoreCase("cashcheck")) { ItemStack check = player.getInventory().getItemInMainHand(); if (!isCheck(check)) { - player.sendMessage("You must hold a valid check to cash it."); + player.sendMessage(BankName()+ChatColor.RED+"You must hold a valid check to cash it."); return true; } @@ -81,29 +84,34 @@ public class CheckCommand implements CommandExecutor { Double amount = meta.getPersistentDataContainer().get(amountKey, PersistentDataType.DOUBLE); if (recipient == null || amount == null) { - player.sendMessage("Invalid check."); + player.sendMessage(BankName()+ChatColor.RED+"Invalid check."); return true; } if (!player.getName().equalsIgnoreCase(recipient)) { - player.sendMessage("This check is not made out to you!"); + player.sendMessage(BankName()+ChatColor.RED + "This check is not written to you!"); return true; } econ.depositPlayer(player, amount); player.getInventory().setItemInMainHand(null); - player.sendMessage("You cashed a check for " + amount + "."); + player.sendMessage(BankName()+ChatColor.GREEN + "You have cashed a check for " + ChatColor.GOLD + "$" + amount); return true; } return false; } - + private final DecimalFormat formatter = new DecimalFormat("#,###.##"); + public String BankName() { + return ChatColor.GRAY+"[ "+ChatColor.AQUA+"C.S.E.L. Bank "+ChatColor.GRAY+"] "; + } private ItemStack createCheck(String recipient, double amount) { ItemStack check = new ItemStack(Material.PAPER); ItemMeta meta = check.getItemMeta(); + // Format the amount for better readability + String formattedAmount = formatter.format(amount); meta.setDisplayName("§6C.S.E.L. Check"); - meta.setLore(Arrays.asList("§7Recipient: §b" + recipient, "§7Amount: §a" + amount)); + meta.setLore(Arrays.asList("§7Recipient: §b" + recipient, "§7Amount: §a$" + formattedAmount)); meta.getPersistentDataContainer().set(recipientKey, PersistentDataType.STRING, recipient); meta.getPersistentDataContainer().set(amountKey, PersistentDataType.DOUBLE, amount);