More data being loaded

This commit is contained in:
Niels Vergucht 2018-12-03 13:12:57 +01:00
parent 42738e9306
commit 5c4eac8d3e
2 changed files with 40 additions and 0 deletions

View File

@ -7,7 +7,9 @@ import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class ConfigManager {
@ -20,10 +22,14 @@ public class ConfigManager {
private String bulkShopDecreasePath = "BULK-SHOP-INVENTORY.decrease-item";
private String bulkShopPurchasePath = "BULK-SHOP-INVENTORY.purchase-item";
private List<String> ignoredMaterials;
private ItemStack backButton;
public ConfigManager() {
this.epicBuckets = EpicBuckets.getInstance();
ignoredMaterials = new ArrayList<>();
setup();
}
@ -31,10 +37,16 @@ public class ConfigManager {
epicBuckets.saveDefaultConfig();
createConfig("shops", true);
loadData();
setupBackButton();
setupFillItem();
}
private void loadData() {
ignoredMaterials = epicBuckets.getConfig().getStringList("IGNORE-MATERIALS");
//TODO: load in all config data
}
private void setupFillItem() {
boolean m = Validator.getInstance().isMaterial(epicBuckets.getConfig().getString(getFillItemPath() + ".material"));

View File

@ -87,4 +87,32 @@ public class ShopManager {
return shopPath;
}
public ItemStack getIncreaseItem() {
return increaseItem;
}
public ItemStack getDecreaseItem() {
return decreaseItem;
}
public ItemStack getPurchaseItem() {
return purchaseItem;
}
public List<Integer> getIncreaseSlots() {
return increaseSlots;
}
public List<Integer> getDecreaseSlots() {
return decreaseSlots;
}
public int getPurchaseSlot() {
return purchaseSlot;
}
public boolean isUseBackButtons() {
return useBackButtons;
}
}