Solved Config count

Discussion in 'Spigot Plugin Development' started by BersamBas, Jul 5, 2018.

  1. Code (YAML):
    Potatoes_Duck:
      Home1
    :
        X
    : -1066.9160641216442
        Y
    : 4.0
        Z
    : -609.6887924364514
        world
    : world
      Home2
    :
        X
    : -1070.7070218869899
        Y
    : 4.0
        Z
    : -609.1724408642259
        world
    : world
      Home3
    :
        X
    : -1074.8114084572142
        Y
    : 4.0
        Z
    : -611.1364267376588
        world
    : world
      Home4
    :
        X
    : -1094.6627945161115
        Y
    : 8.0
        Z
    : -620.661089443538
        world
    : world
    I'm trying to count how many homes under a ceartain player.
    The player is Potatoes_Duck
    The homes are Home1 Home2 Home3 Home4
    How would I write a function to count them?
     
  2. ConfigurationSection#getKeys(false) on "Potatoes_Duck" and get the size() of the result.
     
    • Agree Agree x 1