mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-26 15:45:12 +01:00
Fixed class-cast
This commit is contained in:
parent
c6fc8f61c3
commit
6781dbde5b
@ -165,8 +165,7 @@ public class AnvilMerge {
|
|||||||
AtomicBoolean doesConflict = new AtomicBoolean(false);
|
AtomicBoolean doesConflict = new AtomicBoolean(false);
|
||||||
|
|
||||||
EnchantmentType.values().forEach(enchantmentType -> {
|
EnchantmentType.values().forEach(enchantmentType -> {
|
||||||
EcoEnchant enchant = (EcoEnchant) enchantment;
|
if (!(enchantment instanceof EcoEnchant enchant)) {
|
||||||
if (enchant == null) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (enchant.getType().equals(enchantmentType) && EcoEnchants.hasAnyOfType(left, enchantmentType) && enchantmentType.isSingular()) {
|
if (enchant.getType().equals(enchantmentType) && EcoEnchants.hasAnyOfType(left, enchantmentType) && enchantmentType.isSingular()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user