package config; import manager.STableManager; import manager.Table; import java.util.Map; import java.util.TreeMap; @Table(name ="GuildWarRewardConfig") public class SGuildWarRewardConfig implements BaseConfig { private int id; private int section; private int[][] reward; public static Map treeReward = new TreeMap<>(); @Override public void init() throws Exception { Map config = STableManager.getConfig(SGuildWarRewardConfig.class); for(Map.Entry entry:config.entrySet()){ treeReward.putIfAbsent(entry.getValue().getSection(),entry.getValue()); } } public int getId() { return id; } public int getSection() { return section; } public int[][] getReward() { return reward; } }