mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-10-26 12:25:28 +00:00
add ward enchantment
This commit is contained in:
@@ -72,6 +72,9 @@ public class EnchantioConfig {
|
||||
ConfigurationSection volleySection = getConfigSection(enchantsSection, "volley");
|
||||
VolleyEnchant.create(volleySection);
|
||||
|
||||
ConfigurationSection wardSection = getConfigSection(enchantsSection, "ward");
|
||||
WardEnchant.create(wardSection);
|
||||
|
||||
ConfigurationSection cursesSection = getConfigSection(configuration, "curses");
|
||||
|
||||
ConfigurationSection panicSection = getConfigSection(cursesSection, "panic");
|
||||
@@ -95,6 +98,15 @@ public class EnchantioConfig {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static String getString(ConfigurationSection section, String key, String defaultValue) {
|
||||
String value = section.contains(key) ? section.getString(key) : null;
|
||||
if (value == null) {
|
||||
section.set(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public static int getInt(ConfigurationSection section, String key, int defaultValue) {
|
||||
int value = section.contains(key) ? section.getInt(key) : -1;
|
||||
if (value == -1) {
|
||||
|
||||
Reference in New Issue
Block a user