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>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<revision>1.13.0</revision>
|
<revision>1.13.1</revision>
|
||||||
</properties>
|
</properties>
|
||||||
<url>https://youhavetrouble.me</url>
|
<url>https://youhavetrouble.me</url>
|
||||||
|
|
||||||
|
|||||||
@@ -130,12 +130,11 @@ public class EnchantioConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getBoolean(ConfigurationSection section, String key, boolean defaultValue) {
|
public static boolean getBoolean(ConfigurationSection section, String key, boolean defaultValue) {
|
||||||
boolean value = section.contains(key) && section.getBoolean(key);
|
if (!section.contains(key)) {
|
||||||
if (!value) {
|
|
||||||
section.set(key, defaultValue);
|
section.set(key, defaultValue);
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
return true;
|
return section.getBoolean(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void migrateEnchantTags(@NotNull ConfigurationSection section) {
|
public static void migrateEnchantTags(@NotNull ConfigurationSection section) {
|
||||||
|
|||||||
Reference in New Issue
Block a user