This is how my config looks like. Does anyone know how I can get both test and test2? I know you can do warps.testaccount.test and warps.testaccount.test2. I want to know how I can loop through the configurationsections and get test and test2 Code:java warps: testaccount: test: x: 123.86839507140115 y: 66.0 z: -147.6631869106123 pitch: 23.07815 yaw: -15.718949 world: world Test2: x: 125.25812331560793 y: 66.0 z: -147.32224844473888 pitch: 19.511778 yaw: -18.655962 world: world
I believe what you're looking for is this: Code:java for(String str : config.getStringList("warps.testaccount")) { // This will return test and Test2}
this should loop through the whole config: Code:java for (String key : config.getKeys(true)){ player.sendMessage(key + ": " + config.get(key));} filexfritz had shown me this, what it does is sends the whole config to a player. but if your looking to loop through the config this does that.