mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Remove getConflictsWithEverything for legacy Eco Enchant
This commit is contained in:
parent
1e3b193d46
commit
0c223dd411
3 changed files with 15 additions and 23 deletions
|
|
@ -11,10 +11,6 @@ import java.util.Set;
|
||||||
*/
|
*/
|
||||||
public class EcoEnchant {
|
public class EcoEnchant {
|
||||||
|
|
||||||
public boolean getConflictsWithEverything() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean conflictsWith(@NotNull Enchantment enchant) {
|
public boolean conflictsWith(@NotNull Enchantment enchant) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ public class CAEcoEnchant extends CABukkitEnchantment implements AdditionalTestE
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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()) {
|
if(enchantments.isEmpty()) return false;
|
||||||
|
|
||||||
if (this.ecoEnchant.getConflictsWithEverything()) {
|
if (this.ecoEnchant.getConflictsWithEverything()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -34,7 +35,6 @@ public class CAEcoEnchant extends CABukkitEnchantment implements AdditionalTestE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,7 @@ public class CALegacyEcoEnchant extends CABukkitEnchantment implements Additiona
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
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()) {
|
if (enchantments.isEmpty()) return false;
|
||||||
if (this.ecoEnchant.getConflictsWithEverything()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (CAEnchantment other : enchantments.keySet()) {
|
for (CAEnchantment other : enchantments.keySet()) {
|
||||||
if (other instanceof CABukkitEnchantment otherVanilla
|
if (other instanceof CABukkitEnchantment otherVanilla
|
||||||
|
|
@ -34,7 +31,6 @@ public class CALegacyEcoEnchant extends CABukkitEnchantment implements Additiona
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue