Solved Money help

Discussion in 'Spigot Plugin Development' started by JustCedric, May 19, 2016.

  1. Hi guys,

    Im tryna make a plugin and I found this code:
    Code (Text):
            double balance = money;
            DecimalFormat df = new DecimalFormat("###,###,###,###,###.##");
            String formattedBalance = df.format(balance);
    But I dont want comma's but I want dots instead but I get an error then.
    org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.PlayerList.onPlayerJoin(PlayerList.java:332) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.PlayerList.a(PlayerList.java:158) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.LoginListener.b(LoginListener.java:144) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.LoginListener.c(LoginListener.java:54) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.NetworkManager.a(NetworkManager.java:232) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.ServerConnection.c(ServerConnection.java:141) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.MinecraftServer.D(MinecraftServer.java:820) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] at java.lang.Thread.run(Unknown Source) [?:1.7.0_80] Caused by: java.lang.IllegalArgumentException: Multiple decimal separators in pattern "###.###.###.###.###,##" at java.text.DecimalFormat.applyPattern(Unknown Source) ~[?:1.7.0_80] at java.text.DecimalFormat.<init>(Unknown Source) ~[?:1.7.0_80] at me.justcedric.mrp.events.Join.ScoreboardUpdate(Join.java:76) ~[?:?] at me.justcedric.mrp.events.Join.onJoin(Join.java:60) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_80] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_80] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.9.jar:git-Spigot-1a196e1-6f032cd] ... 14 more
    So my question is does someone know what code I can use?