@@ -0,0 +1,1016 @@
+package vg.civcraft.mc.civmodcore.config;%0A%0Aimport com.google.common.base.Preconditions;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport javax.annotation.Nonnull;%0Aimport org.bukkit.configuration.ConfigurationSection;%0A%0Apublic final class ConfigHelper %7B%0A%0A%09/**%0A%09 * Retrieves a string list from a given config section. If the keyed value is a standalone string instead of a%0A%09 * list, that value will be converted to a list.%0A%09 *%0A%09 * @param config The config section to retrieve the list from.%0A%09 * @param key The key to get the list of.%0A%09 * @return Returns a list of strings, which is never null.%0A%09 */%0A%09public static List%3CString%3E getStringList(@Nonnull final ConfigurationSection config, @Nonnull final String key) %7B%0A%09%09Preconditions.checkNotNull(config, %22Config cannot be null!%22);%0A%09%09Preconditions.checkNotNull(key, %22Key cannot be null!%22);%0A%09%09if (config.isString(key)) %7B%0A%09%09%09final var list = new ArrayList%3CString%3E(1);%0A%09%09%09list.add(config.getString(key));%0A%09%09%09return list;%0A%09%09%7D%0A%09%09return config.getStringList(key);%0A%09%7D%0A%0A%7D%0A

Add ConfigHelper to help with extracting values from configs