From 1cfe3cc1795baf7d3739f50618d14b519fc95d95 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 30 Jun 2021 09:44:37 +0100 Subject: [PATCH 1/2] Fixed Vanilla Enchantment#conflictsWith behaviour being incorrectly overridden --- .../proxy/v1_16_R1/enchants/EcoCraftEnchantment.java | 2 +- .../proxy/v1_16_R2/enchants/EcoCraftEnchantment.java | 2 +- .../proxy/v1_16_R3/enchants/EcoCraftEnchantment.java | 2 +- .../proxy/v1_17_R1/enchants/EcoCraftEnchantment.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R1/enchants/EcoCraftEnchantment.java b/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R1/enchants/EcoCraftEnchantment.java index 4e06cc54..8768d61a 100644 --- a/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R1/enchants/EcoCraftEnchantment.java +++ b/eco-core/core-nms/v1_16_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R1/enchants/EcoCraftEnchantment.java @@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment { @Override public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) { - return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other); + return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this); } public void register() { diff --git a/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R2/enchants/EcoCraftEnchantment.java b/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R2/enchants/EcoCraftEnchantment.java index 6f387625..8cb0def6 100644 --- a/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R2/enchants/EcoCraftEnchantment.java +++ b/eco-core/core-nms/v1_16_R2/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R2/enchants/EcoCraftEnchantment.java @@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment { @Override public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) { - return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other); + return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this); } public void register() { diff --git a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java index 227987d3..e421cd51 100644 --- a/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java +++ b/eco-core/core-nms/v1_16_R3/src/main/java/com/willfp/ecoenchants/proxy/v1_16_R3/enchants/EcoCraftEnchantment.java @@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment { @Override public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) { - return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other); + return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this); } public void register() { diff --git a/eco-core/core-nms/v1_17_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_17_R1/enchants/EcoCraftEnchantment.java b/eco-core/core-nms/v1_17_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_17_R1/enchants/EcoCraftEnchantment.java index 574606fe..b82b943e 100644 --- a/eco-core/core-nms/v1_17_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_17_R1/enchants/EcoCraftEnchantment.java +++ b/eco-core/core-nms/v1_17_R1/src/main/java/com/willfp/ecoenchants/proxy/v1_17_R1/enchants/EcoCraftEnchantment.java @@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment { @Override public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) { - return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other); + return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this); } public void register() { From 210f1661fff02d602a87068596179f732d72a32b Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 30 Jun 2021 09:44:48 +0100 Subject: [PATCH 2/2] Updated to 7.8.13 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5266d316..dcf4384b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 7.8.12 +version = 7.8.13 plugin-name = EcoEnchants \ No newline at end of file