Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Implemented Enchantment.conflictsWith(). Addresses BUKKIT-1159
Dieser Commit ist enthalten in:
Ursprung
28c1f571d2
Commit
f219f0efe9
@ -116,4 +116,16 @@ public class CraftEnchantment extends Enchantment {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean conflictsWith(Enchantment other) {
|
||||
if (other instanceof EnchantmentWrapper) {
|
||||
other = ((EnchantmentWrapper) other).getEnchantment();
|
||||
}
|
||||
if (!(other instanceof CraftEnchantment)) {
|
||||
return false;
|
||||
}
|
||||
CraftEnchantment ench = (CraftEnchantment) other;
|
||||
return !target.a(ench.target);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren