Skip to content

Commit

Permalink
remove obsolete allowUnsafeEnchants config option
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Oct 4, 2024
1 parent 639bcbd commit bcf8103
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 61 deletions.
6 changes: 3 additions & 3 deletions patches/server/0004-Purpur-config-files.patch
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ index c1e88c31910e96ef07cece05046c0b55e708b52d..22bdc8fe2796940eb971437e1c97d638
.withRequiredArg()
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..7a571d04eb7622004720dd7c7ec946d88e01ddc7
index 0000000000000000000000000000000000000000..6176bc84e6896d2e60bb219e92e1d668bfbe8eac
--- /dev/null
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -0,0 +1,177 @@
Expand Down Expand Up @@ -262,8 +262,8 @@ index 0000000000000000000000000000000000000000..7a571d04eb7622004720dd7c7ec946d8
+ commands = new HashMap<>();
+ commands.put("purpur", new PurpurCommand("purpur"));
+
+ version = getInt("config-version", 36);
+ set("config-version", 36);
+ version = getInt("config-version", 37);
+ set("config-version", 37);
+
+ readConfig(PurpurConfig.class, null);
+
Expand Down
17 changes: 12 additions & 5 deletions patches/server/0148-Config-to-allow-unsafe-enchants.patch
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,13 @@ index 5f57f3494705ca1664dbca395c1af3280a50cad8..8c14f8c9f61baf1842e42b62bcd73717
return (ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY);
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 3c1b41f0ae58669d6fae640e8763c43e74bd0239..e19346e82ace64d5439d2607709682a9381edfe7 100644
index 6fcb2db92a38e862da288518ce34d16aa4b856e0..e3371ff562b09f05ba0b865b5e301d03e398eee6 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -285,6 +285,29 @@ public class PurpurConfig {
@@ -285,6 +285,36 @@ public class PurpurConfig {
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
}

+ public static boolean allowUnsafeEnchants = false;
+ public static boolean allowInapplicableEnchants = true;
+ public static boolean allowIncompatibleEnchants = true;
+ public static boolean allowHigherEnchantsLevels = true;
Expand All @@ -117,11 +116,19 @@ index 3c1b41f0ae58669d6fae640e8763c43e74bd0239..e19346e82ace64d5439d2607709682a9
+ set("settings.enchantment.anvil.allow-higher-enchants-levels", true);
+ set("settings.enchantment.allow-unsafe-enchants", null);
+ }
+ allowUnsafeEnchants = getBoolean("settings.enchantment.anvil.allow-unsafe-enchants", allowUnsafeEnchants);
+ if (version < 37) {
+ boolean allowUnsafeEnchants = getBoolean("settings.enchantment.anvil.allow-unsafe-enchants", false);
+ if (!allowUnsafeEnchants) {
+ set("settings.enchantment.anvil.allow-inapplicable-enchants", false);
+ set("settings.enchantment.anvil.allow-incompatible-enchants", false);
+ set("settings.enchantment.anvil.allow-higher-enchants-levels", false);
+ }
+ set("settings.enchantment.anvil.allow-unsafe-enchants", null);
+ }
+ allowInapplicableEnchants = getBoolean("settings.enchantment.anvil.allow-inapplicable-enchants", allowInapplicableEnchants);
+ 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
+ allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchantCommand);
+ replaceIncompatibleEnchants = getBoolean("settings.enchantment.anvil.replace-incompatible-enchants", replaceIncompatibleEnchants);
+ }
+
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0153-Config-to-change-max-number-of-bees.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index f933fa419a4b55b0096ff42caf1b071d027b8e7e..fb84af3b1709101fa572d11a1c27970a
public BeehiveBlockEntity(BlockPos pos, BlockState state) {
super(BlockEntityType.BEEHIVE, pos, state);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index e19346e82ace64d5439d2607709682a9381edfe7..499c04781546e8e0bf6d6251e0670cfcff049246 100644
index e3371ff562b09f05ba0b865b5e301d03e398eee6..b0c3135d8af0fd73d6445bdbea91d51527f180b8 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -252,6 +252,7 @@ public class PurpurConfig {
Expand All @@ -36,4 +36,4 @@ index e19346e82ace64d5439d2607709682a9381edfe7..499c04781546e8e0bf6d6251e0670cfc
+ beeInsideBeeHive = getInt("settings.blocks.beehive.max-bees-inside", beeInsideBeeHive);
}

public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Make anvil cumulative cost configurable


diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
index 30746b3ae45840206bf23e811a9819f3b31c9814..60260bcb568613b4a076385e9329a06f3e0fb885 100644
index 5089974b4f46aa5f8b26218ba77209bf7d6e03e1..eaef4f26901c9db4b24b003e2c90161e8ea53f9e 100644
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
@@ -399,7 +399,7 @@ public class AnvilMenu extends ItemCombinerMenu {
Expand All @@ -18,7 +18,7 @@ index 30746b3ae45840206bf23e811a9819f3b31c9814..60260bcb568613b4a076385e9329a06f

public boolean setItemName(String newItemName) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 420999718086d2c598149f459c4f04cdc163b237..7b78896803290d89cbdcbc2d68eccc97d07a0fba 100644
index 35d86953ea87c5977acf1c83c2071bc622996510..7b6366f12109c9a40d96c0f0f5b9f3d167dc8b97 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -271,6 +271,7 @@ public class PurpurConfig {
Expand All @@ -36,4 +36,4 @@ index 420999718086d2c598149f459c4f04cdc163b237..7b78896803290d89cbdcbc2d68eccc97
+ anvilCumulativeCost = getBoolean("settings.blocks.anvil.cumulative-cost", anvilCumulativeCost);
}

public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Make lightning rod range configurable


diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9937cdc35114e5e23d57425267c956c50b843446..2796e70c4178122bb141734b7cdd0b7d64ffda65 100644
index 40a5107d37e908d13bd0307fc41d9a6e3faf1217..277a0b6f38b1ce00fd06066b43ac634f80ab441a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1021,7 +1021,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
Expand All @@ -18,7 +18,7 @@ index 9937cdc35114e5e23d57425267c956c50b843446..2796e70c4178122bb141734b7cdd0b7d
return optional.map((blockposition1) -> {
return blockposition1.above(1);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 7b78896803290d89cbdcbc2d68eccc97d07a0fba..45e75e35e6fb6507fc1322267c05a7a41e0320b8 100644
index 7b6366f12109c9a40d96c0f0f5b9f3d167dc8b97..3ec02424c0c9a9210cbcbd5f2a0c388d344f1019 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -272,6 +272,7 @@ public class PurpurConfig {
Expand All @@ -36,4 +36,4 @@ index 7b78896803290d89cbdcbc2d68eccc97d07a0fba..45e75e35e6fb6507fc1322267c05a7a4
+ lightningRodRange = getInt("settings.blocks.lightning_rod.range", lightningRodRange);
}

public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
4 changes: 2 additions & 2 deletions patches/server/0211-Config-for-grindstones.patch
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ index 138f77d13dda574def523d74fa55bc71b5bfa01b..57c9e636a10e5845f197cae39d4f885a
}

diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 21dff6a902b3c4e0fb40e61b4974ead7a6c920f2..34bcb00ba8fab7ad1422fc2c07017b464afc6f09 100644
index 37b802a1de4ade72d53463819d7774436d68be51..f4c8dd204943f77760f0a7f73838776bf2f85b63 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -311,6 +311,9 @@ public class PurpurConfig {
Expand Down Expand Up @@ -157,4 +157,4 @@ index 21dff6a902b3c4e0fb40e61b4974ead7a6c920f2..34bcb00ba8fab7ad1422fc2c07017b46
+ grindstoneRemoveDisplay = getBoolean("settings.blocks.grindstone.remove-name-and-lore", grindstoneRemoveDisplay);
}

public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
8 changes: 4 additions & 4 deletions patches/server/0212-UPnP-Port-Forwarding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] UPnP Port Forwarding


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index afd694d65a1f40f16f4fedc643ccd3acbe62591e..9aadf8a5e4cdf659d28bc4963dbc06c2b4eb97a9 100644
index 7e7f66ab202e5ac3bd8f91ed0ab1db51c2679101..027bc1f3ad7c6cab51b57122eae553b010082f1c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -320,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand Down Expand Up @@ -33,7 +33,7 @@ index afd694d65a1f40f16f4fedc643ccd3acbe62591e..9aadf8a5e4cdf659d28bc4963dbc06c2
if (this.server != null) {
this.server.disablePlugins();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index e0f7c6fa2a545d54135da6357440b79af85e06f1..36d9ad38347e65c68656300af0dcd5e7afffe800 100644
index e093ef5b2712776767db6b9b78e46bbee5b91ee5..7288850095495472ef35c8eb03fb519dd0f704ee 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -297,6 +297,30 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand Down Expand Up @@ -68,10 +68,10 @@ index e0f7c6fa2a545d54135da6357440b79af85e06f1..36d9ad38347e65c68656300af0dcd5e7
// CraftBukkit start
// this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); // Spigot - moved up
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 34bcb00ba8fab7ad1422fc2c07017b464afc6f09..ccc2b99c8aec56e6434b7b83ebee6e286b6b22d2 100644
index f4c8dd204943f77760f0a7f73838776bf2f85b63..3351f1aad470e27501dd60436756fada434b9e25 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -414,4 +414,9 @@ public class PurpurConfig {
@@ -421,4 +421,9 @@ public class PurpurConfig {
private static void tpsCatchup() {
tpsCatchup = getBoolean("settings.tps-catchup", tpsCatchup);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ index 3dec5a082606ee35a8c8d7f746480262d6a189c5..b2f6ccae9576c176263e51a232e17a08
+ // Purpur end
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index ccc2b99c8aec56e6434b7b83ebee6e286b6b22d2..d0683af41c56ed485da11ff2a74f0cf282cf00d4 100644
index 3351f1aad470e27501dd60436756fada434b9e25..569b8e21c2afd88fff1820307d75350b405a88e5 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -314,6 +314,10 @@ public class PurpurConfig {
Expand Down Expand Up @@ -179,4 +179,4 @@ index ccc2b99c8aec56e6434b7b83ebee6e286b6b22d2..d0683af41c56ed485da11ff2a74f0cf2
+ }
}

public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ index 0bd191acb9596d3aa21c337230d26f09d26f6888..20211f40aeeade9217ece087688974bd
return false;
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index d0683af41c56ed485da11ff2a74f0cf282cf00d4..3032944e7ae61f31ceb72ad688add99f2451f33e 100644
index 569b8e21c2afd88fff1820307d75350b405a88e5..ccf4d068b4cd11ad666b01bba9cbed1d428e6af3 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -447,4 +447,11 @@ public class PurpurConfig {
@@ -454,4 +454,11 @@ public class PurpurConfig {
private static void networkSettings() {
useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP);
}
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0225-Shears-can-have-looting-enchantment.patch
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,22 @@ index 71efea7a6bfb5662890dae5faae27a3c80afad2b..f3aae2c50d05a05ad4aef36d432b87b4
}
// Paper end - shear drops API
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 3032944e7ae61f31ceb72ad688add99f2451f33e..346113abdc8da4a2fe69650642515460086a357a 100644
index ccf4d068b4cd11ad666b01bba9cbed1d428e6af3..29b07c04c23772da1b29499e4db9c678ebbd2180 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -393,6 +393,7 @@ public class PurpurConfig {
}
}

+ public static boolean allowShearsLooting = false;
public static boolean allowUnsafeEnchants = false;
public static boolean allowInapplicableEnchants = true;
public static boolean allowIncompatibleEnchants = true;
@@ -408,6 +409,7 @@ public class PurpurConfig {
set("settings.enchantment.anvil.allow-higher-enchants-levels", true);
set("settings.enchantment.allow-unsafe-enchants", null);
public static boolean allowHigherEnchantsLevels = true;
@@ -416,6 +417,7 @@ public class PurpurConfig {
}
set("settings.enchantment.anvil.allow-unsafe-enchants", null);
}
+ allowShearsLooting = getBoolean("settings.enchantment.allow-looting-on-shears", allowShearsLooting);
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);
allowHigherEnchantsLevels = getBoolean("settings.enchantment.anvil.allow-higher-enchants-levels", allowHigherEnchantsLevels);
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Give bee counts in beehives to Purpur clients


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9aadf8a5e4cdf659d28bc4963dbc06c2b4eb97a9..bf6620d9041ea63bc09d361e205c685de0542437 100644
index 027bc1f3ad7c6cab51b57122eae553b010082f1c..226fa1fa3b7949e23c3f6f283d728949694a8a5c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1149,6 +1149,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -17,7 +17,7 @@ index 9aadf8a5e4cdf659d28bc4963dbc06c2b4eb97a9..bf6620d9041ea63bc09d361e205c685d
this.hasLoggedStop = true; // Paper - Debugging
if (isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 36d9ad38347e65c68656300af0dcd5e7afffe800..2d3f9550d4fb47b461ed5d4c1de62d511b1ad31d 100644
index 7288850095495472ef35c8eb03fb519dd0f704ee..f679caa20e762f21704d8d5f1a69990195634000 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -396,6 +396,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand All @@ -29,10 +29,10 @@ index 36d9ad38347e65c68656300af0dcd5e7afffe800..2d3f9550d4fb47b461ed5d4c1de62d51
}
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 346113abdc8da4a2fe69650642515460086a357a..a36b5d9c61a99ce217ad4bea82ea7478821b867c 100644
index 29b07c04c23772da1b29499e4db9c678ebbd2180..5643fced7c9fd52552fe082142128a83fd76d2c0 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -429,6 +429,11 @@ public class PurpurConfig {
@@ -436,6 +436,11 @@ public class PurpurConfig {
allowWaterPlacementInTheEnd = getBoolean("settings.allow-water-placement-in-the-end", allowWaterPlacementInTheEnd);
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0232-Max-joins-per-second.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ index 3e550f8e7cd4f4e16f499a8a2a4b95420270f07a..a937bc49a85c0e565f0400163c1c9174
}
// Paper end - Buffer joins to world
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index a36b5d9c61a99ce217ad4bea82ea7478821b867c..da1be83cec7c92a75f345a8879520503c563d280 100644
index 5643fced7c9fd52552fe082142128a83fd76d2c0..96b50d5f4e3f51f40e57a4061229f09aaa49eb94 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -451,8 +451,10 @@ public class PurpurConfig {
@@ -458,8 +458,10 @@ public class PurpurConfig {
}

public static boolean useUPnP = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ index 8ac485d82c2d2b32f4d54e02c18c2cb2c3df4fa4..9ebe6a5f31ceacd33d9c111966ad941b
}

diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index da1be83cec7c92a75f345a8879520503c563d280..8569054673f43a339694dec3bc02eb05019a5571 100644
index 96b50d5f4e3f51f40e57a4061229f09aaa49eb94..94da1ade7a7ee4df42532feb4443513d0d15026a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -400,6 +400,7 @@ public class PurpurConfig {
@@ -399,6 +399,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 < 30) {
boolean oldValue = getBoolean("settings.enchantment.allow-unsafe-enchants", false);
@@ -416,6 +417,7 @@ public class PurpurConfig {
@@ -423,6 +424,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
allowUnsafeEnchantCommand = getBoolean("settings.enchantment.allow-unsafe-enchant-command", allowUnsafeEnchantCommand);
replaceIncompatibleEnchants = getBoolean("settings.enchantment.anvil.replace-incompatible-enchants", replaceIncompatibleEnchants);
+ clampEnchantLevels = getBoolean("settings.enchantment.clamp-levels", clampEnchantLevels);
}
Expand Down
Loading

0 comments on commit bcf8103

Please sign in to comment.