fix enchants failing to disable (#2)

This commit is contained in:
2025-08-08 21:04:24 +02:00
parent 20a6d90f56
commit 3c89dec816
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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) {