mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
Confiigg
This commit is contained in:
parent
4e5f8ddcda
commit
c8e42ff9d1
@ -104,6 +104,10 @@ public class Config {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Category> getCategories() {
|
||||
return new ArrayList<>(categories.values());
|
||||
}
|
||||
|
||||
public boolean hasCategory(String key) {
|
||||
return getCategory(key) != null;
|
||||
}
|
||||
|
@ -116,11 +116,11 @@ public class SettingsManager implements Listener {
|
||||
Inventory inventory = Bukkit.createInventory(null, 27, plugin.getName() + " Settings Manager");
|
||||
|
||||
int slot = 10;
|
||||
for (String key : config.getFileConfiguration().getDefaultSection().getKeys(false)) {
|
||||
for (Category category : config.getCategories()) {
|
||||
ItemStack item = new ItemStack(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13) ? Material.LEGACY_WOOL : Material.valueOf("WOOL"), 1, (byte) (slot - 9));
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.setLore(Collections.singletonList(Methods.formatText("&6Click To Edit This Category.")));
|
||||
meta.setDisplayName(Methods.formatText("&f&l" + key));
|
||||
meta.setDisplayName(Methods.formatText("&f&l" + category.getKey()));
|
||||
item.setItemMeta(meta);
|
||||
inventory.setItem(slot, item);
|
||||
slot++;
|
||||
|
Loading…
Reference in New Issue
Block a user