mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
fix eco enchant conflict with everything
This commit is contained in:
parent
8e3f190bb3
commit
9ed43f3def
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ public class CAEcoEnchant extends CABukkitEnchantment implements AdditionalTestE
|
||||||
public boolean isEnchantConflict(@NotNull Map<CAEnchantment, Integer> enchantments, @NotNull Material itemMat) {
|
public boolean isEnchantConflict(@NotNull Map<CAEnchantment, Integer> enchantments, @NotNull Material itemMat) {
|
||||||
if (enchantments.isEmpty()) return false;
|
if (enchantments.isEmpty()) return false;
|
||||||
|
|
||||||
|
// Check if there is only self
|
||||||
|
if (enchantments.size() == 1 && this.equals(enchantments.keySet().stream().findFirst().get()))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (this.ecoEnchant.getConflictsWithEverything()) {
|
if (this.ecoEnchant.getConflictsWithEverything()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue