From 1cfe3cc1795baf7d3739f50618d14b519fc95d95 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 30 Jun 2021 09:44:37 +0100 Subject: [PATCH] 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() {