Money Dezimal Number

Discussion in 'Spigot Help' started by swerck, Jan 28, 2020.

  1. Hey everybody,

    i want do show in Scorebored the Money with dezimal numbers.

    I just testet with all Placeholdes from Vault but nothing change it.

    Do u have any idea about this?
  2. Code (Java):
    String strMoney = "" + money;
    strMoney = strMoney.replace(".", ",");

    //Just set strMoney to your scoreboard
  3. Where i must place it? In conig.yml
  4. Strahan


    Well... that'd work, but I assume what he wants is to have numbers formatted as they do in Germany. A less hacky approach would be to take the numeric value and use localization:
    Code (Text):
    DecimalFormat decFormat = (DecimalFormat)DecimalFormat.getNumberInstance(Locale.GERMAN);

    whateverMethod() {
      double someNumber = 123456789;
      String display = decFormat.format(someNumber);
    By asking that, I assume you are not developing your own plugin so ignore what I just said. Hmmm you'd have to check with whatever plugin is providing data to your scoreboard to see if it supports formatting.