I have a bukkit config file that looks like this:
effected mobs:
skeleton:
lower hp limit: 0
upper hp limit: 0
zombie:
lower hp limit: 0
upper hp limit: 0
spider:
lower hp limit: 0
upper hp limit: 0
I'm trying to get a set that contains [skeleton, zombie, spider] and any others that may be added by giving it the key "effected mobs". I have looked at this similar question and tried the following code:
public class Main extends JavaPlugin implements Listener{
public FileConfiguration config;
public Set<String> mobsEffected;
public void onEnable(){
config = getConfig();
mobsEffected = config.getConfigurationSection("effected mobs").getKeys(false);
Bukkit.getLogger().info(String.valueOf(mobsEffected.size() ));
}
}
but the size is logged as 0, when it should be 3. Any advice?