127 lines
3.6 KiB
Java
127 lines
3.6 KiB
Java
package com.me.tft_02.soulbound.config;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import cn.citycraft.PluginHelper.config.FileConfig;
|
|
|
|
public class Config {
|
|
private static FileConfig config;
|
|
|
|
public static boolean getAllowItemStoring() {
|
|
return config.getBoolean("Soulbound.Allow_Item_Storing", true);
|
|
}
|
|
|
|
public static List<String> getBindCommands() {
|
|
return config.getStringList("Soulbound.Commands_Bind_When_Used");
|
|
}
|
|
|
|
public static List<String> getBlockedCommands() {
|
|
return config.getStringList("Soulbound.Blocked_Commands");
|
|
}
|
|
|
|
public static boolean getConfigOverwriteEnabled() {
|
|
return config.getBoolean("General.Config_Update_Overwrite", true);
|
|
}
|
|
|
|
public static boolean getDeleteOnDrop() {
|
|
return config.getBoolean("Soulbound.Delete_On_Drop", false);
|
|
}
|
|
|
|
public static List<String> getDiabloDropsBindOnEquipTiers() {
|
|
return getDiabloDropsItemTiers("BindOnEquip");
|
|
}
|
|
|
|
public static List<String> getDiabloDropsBindOnPickupTiers() {
|
|
return getDiabloDropsItemTiers("BindOnPickup");
|
|
}
|
|
|
|
public static List<String> getDiabloDropsBindOnUseTiers() {
|
|
return getDiabloDropsItemTiers("BindOnUse");
|
|
}
|
|
|
|
public static List<String> getDiabloDropsItemTiers(final String bindType) {
|
|
final String[] tiersString = config.getString("Dependency_Plugins.DiabloDrops." + bindType).replaceAll(" ", "").split("[,]");
|
|
final List<String> tiers = new ArrayList<String>();
|
|
|
|
for (final String tier : tiersString) {
|
|
tiers.add(tier);
|
|
}
|
|
return tiers;
|
|
}
|
|
|
|
public static boolean getEBRBindOnEquip() {
|
|
return config.getBoolean("Dependency_Plugins.EpicBossRecoded.BindOnEquip");
|
|
}
|
|
|
|
public static boolean getEBRBindOnPickup() {
|
|
return config.getBoolean("Dependency_Plugins.EpicBossRecoded.BindOnPickup");
|
|
}
|
|
|
|
public static boolean getEBRBindOnUse() {
|
|
return config.getBoolean("Dependency_Plugins.EpicBossRecoded.BindOnUse");
|
|
}
|
|
|
|
public static boolean getFeedbackEnabled() {
|
|
return config.getBoolean("Soulbound.Feedback_Messages_Enabled", true);
|
|
}
|
|
|
|
public static boolean getInfiniteDurability() {
|
|
return config.getBoolean("Soulbound.Infinite_Durability", false);
|
|
}
|
|
|
|
public static boolean getLoreLocksBindKeys() {
|
|
return config.getBoolean("Dependency_Plugins.LoreLocks.Bind_Keys");
|
|
}
|
|
|
|
public static List<String> getMythicDropsBindOnEquipTiers() {
|
|
return getMythicDropsItemTiers("BindOnEquip");
|
|
}
|
|
|
|
public static List<String> getMythicDropsBindOnPickupTiers() {
|
|
return getMythicDropsItemTiers("BindOnPickup");
|
|
}
|
|
|
|
public static List<String> getMythicDropsBindOnUseTiers() {
|
|
return getMythicDropsItemTiers("BindOnUse");
|
|
}
|
|
|
|
public static List<String> getMythicDropsItemTiers(final String bindType) {
|
|
final String[] tiersString = config.getString("Dependency_Plugins.MythicDrops." + bindType).replaceAll(" ", "").split("[,]");
|
|
final List<String> tiers = new ArrayList<String>();
|
|
|
|
for (final String tier : tiersString) {
|
|
tiers.add(tier);
|
|
}
|
|
return tiers;
|
|
}
|
|
|
|
public static boolean getPreferBeta() {
|
|
return config.getBoolean("General.Prefer_Beta", false);
|
|
}
|
|
|
|
public static boolean getPreventItemDrop() {
|
|
return config.getBoolean("Soulbound.Prevent_Item_Drop", false);
|
|
}
|
|
|
|
public static boolean getShowNameInLore() {
|
|
return config.getBoolean("Soulbound.Show_Name_In_Lore", true);
|
|
}
|
|
|
|
public static boolean getStatsTrackingEnabled() {
|
|
return config.getBoolean("General.Stats_Tracking", true);
|
|
}
|
|
|
|
public static boolean getUpdateCheckEnabled() {
|
|
return config.getBoolean("General.Update_Check", true);
|
|
}
|
|
|
|
public static boolean getVerboseLoggingEnabled() {
|
|
return config.getBoolean("General.Verbose_Logging", false);
|
|
}
|
|
|
|
public static void load(final FileConfig config) {
|
|
Config.config = config;
|
|
}
|
|
}
|