mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-11 21:56:55 +00:00
fix enchants failing to disable (#2)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<revision>1.13.0</revision>
|
||||
<revision>1.13.1</revision>
|
||||
</properties>
|
||||
<url>https://youhavetrouble.me</url>
|
||||
|
||||
|
||||
@@ -130,12 +130,11 @@ public class EnchantioConfig {
|
||||
}
|
||||
|
||||
public static boolean getBoolean(ConfigurationSection section, String key, boolean defaultValue) {
|
||||
boolean value = section.contains(key) && section.getBoolean(key);
|
||||
if (!value) {
|
||||
if (!section.contains(key)) {
|
||||
section.set(key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
return true;
|
||||
return section.getBoolean(key);
|
||||
}
|
||||
|
||||
public static void migrateEnchantTags(@NotNull ConfigurationSection section) {
|
||||
|
||||
Reference in New Issue
Block a user