mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Add configuration option to replace incompatible enchantments (#1419)
This commit is contained in:
@@ -31,21 +31,21 @@ index 2048899f8e4c8211e8dde0d11148d647678009fa..1eec84e217f6dc929091fa7451cd235e
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index abea0905cc8a1ce6bffd4f2e581faea38ddd5b13..33a67078ba6ecc11d2929a164354702664d6a480 100644
|
||||
index 44e8822dae170c07e48ae016826a6710b7d7e29a..4d147845402a26957c905dd600bf0657bb7bd714 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -397,6 +397,7 @@ public class PurpurConfig {
|
||||
public static boolean allowIncompatibleEnchants = true;
|
||||
@@ -398,6 +398,7 @@ public class PurpurConfig {
|
||||
public static boolean allowHigherEnchantsLevels = true;
|
||||
public static boolean allowUnsafeEnchantCommand = false;
|
||||
public static boolean replaceIncompatibleEnchants = false;
|
||||
+ public static boolean clampEnchantLevels = true;
|
||||
private static void enchantmentSettings() {
|
||||
if (version < 5) {
|
||||
boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
|
||||
@@ -419,6 +420,7 @@ public class PurpurConfig {
|
||||
allowIncompatibleEnchants = getBoolean("settings.enchantment.anvil.allow-incompatible-enchants", allowIncompatibleEnchants);
|
||||
@@ -421,6 +422,7 @@ public class PurpurConfig {
|
||||
allowHigherEnchantsLevels = getBoolean("settings.enchantment.anvil.allow-higher-enchants-levels", allowHigherEnchantsLevels);
|
||||
allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchants); // allowUnsafeEnchants as default for backwards compatability
|
||||
replaceIncompatibleEnchants = getBoolean("settings.enchantment.anvil.replace-incompatible-enchants", replaceIncompatibleEnchants);
|
||||
+ clampEnchantLevels = getBoolean("settings.enchantment.clamp-levels", clampEnchantLevels);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user