mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Config is handled by MainConfig not built in class
This commit is contained in:
parent
92d63180f9
commit
107d886b35
@ -5,6 +5,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -18,7 +19,8 @@ public class Command_links extends FreedomCommand
|
||||
@Override
|
||||
protected boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
ConfigurationSection section = plugin.getConfig().getConfigurationSection("social_links");
|
||||
YamlConfiguration config = plugin.config.configuration;
|
||||
ConfigurationSection section = config.getConfigurationSection("social_links");
|
||||
if (section != null)
|
||||
{
|
||||
Map<String, Object> values = section.getValues(false);
|
||||
|
@ -21,6 +21,7 @@ public class MainConfig extends PluginComponent<TotalFreedomMod>
|
||||
//
|
||||
private final EnumMap<ConfigEntry, Object> entries;
|
||||
private final ConfigDefaults defaults;
|
||||
public YamlConfiguration configuration;
|
||||
|
||||
public MainConfig(TotalFreedomMod plugin)
|
||||
{
|
||||
@ -67,6 +68,8 @@ public class MainConfig extends PluginComponent<TotalFreedomMod>
|
||||
|
||||
config.load(getConfigFile());
|
||||
|
||||
configuration = config;
|
||||
|
||||
for (ConfigEntry entry : ConfigEntry.values())
|
||||
{
|
||||
String path = entry.getConfigName();
|
||||
|
Loading…
Reference in New Issue
Block a user