mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Add methods to check for conflicting enchantments. Adds BUKKIT-3830
This commit is contained in:
parent
d18bdf14e9
commit
1e7bb5a6ea
2 changed files with 16 additions and 0 deletions
|
@ -61,5 +61,13 @@ public interface EnchantmentStorageMeta extends ItemMeta {
|
|||
*/
|
||||
boolean removeStoredEnchant(Enchantment ench) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.
|
||||
*
|
||||
* @param ench enchantment to test
|
||||
* @return true if the enchantment conflicts, false otherwise
|
||||
*/
|
||||
boolean hasConflictingStoredEnchant(Enchantment ench);
|
||||
|
||||
EnchantmentStorageMeta clone();
|
||||
}
|
||||
|
|
|
@ -107,6 +107,14 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
|
|||
*/
|
||||
boolean removeEnchant(Enchantment ench);
|
||||
|
||||
/**
|
||||
* Checks if the specified enchantment conflicts with any enchantments in this ItemMeta.
|
||||
*
|
||||
* @param ench enchantment to test
|
||||
* @return true if the enchantment conflicts, false otherwise
|
||||
*/
|
||||
boolean hasConflictingEnchant(Enchantment ench);
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
ItemMeta clone();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue