mirror of
https://github.com/songoda/EpicBuckets.git
synced 2024-11-26 04:05:55 +01:00
More data being loaded
This commit is contained in:
parent
42738e9306
commit
5c4eac8d3e
@ -7,7 +7,9 @@ import org.bukkit.configuration.file.FileConfiguration;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ConfigManager {
|
public class ConfigManager {
|
||||||
|
|
||||||
@ -20,10 +22,14 @@ public class ConfigManager {
|
|||||||
private String bulkShopDecreasePath = "BULK-SHOP-INVENTORY.decrease-item";
|
private String bulkShopDecreasePath = "BULK-SHOP-INVENTORY.decrease-item";
|
||||||
private String bulkShopPurchasePath = "BULK-SHOP-INVENTORY.purchase-item";
|
private String bulkShopPurchasePath = "BULK-SHOP-INVENTORY.purchase-item";
|
||||||
|
|
||||||
|
private List<String> ignoredMaterials;
|
||||||
|
|
||||||
private ItemStack backButton;
|
private ItemStack backButton;
|
||||||
|
|
||||||
public ConfigManager() {
|
public ConfigManager() {
|
||||||
this.epicBuckets = EpicBuckets.getInstance();
|
this.epicBuckets = EpicBuckets.getInstance();
|
||||||
|
ignoredMaterials = new ArrayList<>();
|
||||||
|
|
||||||
setup();
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,10 +37,16 @@ public class ConfigManager {
|
|||||||
epicBuckets.saveDefaultConfig();
|
epicBuckets.saveDefaultConfig();
|
||||||
createConfig("shops", true);
|
createConfig("shops", true);
|
||||||
|
|
||||||
|
loadData();
|
||||||
setupBackButton();
|
setupBackButton();
|
||||||
setupFillItem();
|
setupFillItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadData() {
|
||||||
|
ignoredMaterials = epicBuckets.getConfig().getStringList("IGNORE-MATERIALS");
|
||||||
|
//TODO: load in all config data
|
||||||
|
}
|
||||||
|
|
||||||
private void setupFillItem() {
|
private void setupFillItem() {
|
||||||
boolean m = Validator.getInstance().isMaterial(epicBuckets.getConfig().getString(getFillItemPath() + ".material"));
|
boolean m = Validator.getInstance().isMaterial(epicBuckets.getConfig().getString(getFillItemPath() + ".material"));
|
||||||
|
|
||||||
|
@ -87,4 +87,32 @@ public class ShopManager {
|
|||||||
return shopPath;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user