mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Split allowUnsafeEnchants setting (#1047)
Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
This commit is contained in:
@@ -31,20 +31,20 @@ index 4afa30753a90d9bbd3c71b21cb4a8deadf9ccb3b..1d79da7f8405f7dff3b2e10022a564a9
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 8d4bd88270747bf905ce87573492382cb175d57b..127df4a4c5c84f5e260104a4cc8ef092f7cf9e07 100644
|
||||
index 5e69e2626c2e85c8ef8b29b556ebd81e27042122..ac6e4936b0ad1cef84eae68ebccb5279060d884b 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -376,6 +376,7 @@ public class PurpurConfig {
|
||||
public static boolean allowShearsLooting = false;
|
||||
public static boolean allowUnsafeEnchants = false;
|
||||
@@ -379,6 +379,7 @@ public class PurpurConfig {
|
||||
public static boolean allowIncompatibleEnchants = true;
|
||||
public static boolean allowHigherEnchantsLevels = true;
|
||||
public static boolean allowUnsafeEnchantCommand = false;
|
||||
+ public static boolean clampEnchantLevels = true;
|
||||
private static void enchantmentSettings() {
|
||||
if (version < 5) {
|
||||
boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
|
||||
@@ -387,6 +388,7 @@ public class PurpurConfig {
|
||||
allowShearsLooting = getBoolean("settings.enchantment.allow-looting-on-shears", allowShearsLooting);
|
||||
allowUnsafeEnchants = getBoolean("settings.enchantment.allow-unsafe-enchants", allowUnsafeEnchants);
|
||||
@@ -401,6 +402,7 @@ public class PurpurConfig {
|
||||
allowIncompatibleEnchants = getBoolean("settings.enchantment.anvil.allow-incompatible-enchants", allowIncompatibleEnchants);
|
||||
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
|
||||
+ clampEnchantLevels = getBoolean("settings.enchantment.clamp-levels", clampEnchantLevels);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user