Solved getDouble returning 0?

Discussion in 'Spigot Plugin Development' started by Vhbob, Jul 12, 2018.

  1. Hello, I need to get a double from my config so I used this line of code:
    Code (Text):
    double commonChance = pl.getConfig().getDouble("Chances.Kill.Dust.Common");
    and here is my config:
    Code (Text):
    Chances:
      Dust:
        Mine:
          Common: 2.5
          Uncommon: 1
          Rare: 0.75
          Epic: 0.5
          Legendary: 0.25
        Kill:
          Common: 2.5
          Uncommon: 1
          Rare: 0.75
          Epic: 0.5
          Legendary: 0.25
       
    Why does it result in 0.0?
     
  2. your format is wrong .it should be:

    "Chances.Dust.Kill.Common"
     
    • Like Like x 1
    • Winner Winner x 1

Share This Page