Split allowUnsafeEnchants setting (#1047)

Co-authored-by: BillyGalbreath <blake.galbreath@gmail.com>
This commit is contained in:
Krakenied
2022-07-09 04:37:43 +02:00
committed by GitHub
parent 6061e12e23
commit 023416e380
11 changed files with 65 additions and 47 deletions

View File

@@ -158,7 +158,7 @@ index 6b8a1535086aae7e4e3229d05615fb903188f507..60af917083de1b790b1d93d61835a669
public int getMinCost(int level) {
return 15 + (level - 1) * 9;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 1056b13937bebc5a8f20b78b0fdb7601d50a320e..db890f02f1b2359aecc8becf6a1caddf07cc7ce4 100644
index 81980538e04f2d86d0198b6d6c89f748c32f138e..c46a141fb8eb1ee052bd9b4538efc2caeb570872 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -371,6 +371,7 @@ public class PurpurConfig {
@@ -167,13 +167,13 @@ index 1056b13937bebc5a8f20b78b0fdb7601d50a320e..db890f02f1b2359aecc8becf6a1caddf
public static boolean allowCrossbowInfinity = false;
+ public static boolean allowShearsLooting = false;
public static boolean allowUnsafeEnchants = false;
public static boolean allowUnsafeEnchantCommand = false;
private static void enchantmentSettings() {
@@ -381,6 +382,7 @@ public class PurpurConfig {
public static boolean allowInapplicableEnchants = true;
public static boolean allowIncompatibleEnchants = true;
@@ -392,6 +393,7 @@ public class PurpurConfig {
}
allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
allowCrossbowInfinity = getBoolean("settings.enchantment.allow-infinity-on-crossbow", allowCrossbowInfinity);
+ allowShearsLooting = getBoolean("settings.enchantment.allow-looting-on-shears", allowShearsLooting);
allowUnsafeEnchants = getBoolean("settings.enchantment.allow-unsafe-enchants", allowUnsafeEnchants);
allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchants); // allowUnsafeEnchants as default for backwards compatability
}
allowUnsafeEnchants = getBoolean("settings.enchantment.anvil.allow-unsafe-enchants", allowUnsafeEnchants);
allowInapplicableEnchants = getBoolean("settings.enchantment.anvil.allow-inapplicable-enchants", allowInapplicableEnchants);
allowIncompatibleEnchants = getBoolean("settings.enchantment.anvil.allow-incompatible-enchants", allowIncompatibleEnchants);