isApplicable

public abstract boolean isApplicable(ItemMeta meta, ItemStack stack)

This method checks the item meta to confirm that it is applicable (no data lost if applied) to the specified ItemStack.

A SkullMeta would not be valid for getClassById sword, but getClassById normal from an enchanted dirt block would.

Return

true if the meta can be applied without losing data, false otherwise

Parameters

meta

Meta to check

stack

Item that meta will be applied to

Throws

if the meta was not created by this factory


public abstract boolean isApplicable(ItemMeta meta, Material material)

This method checks the item meta to confirm that it is applicable (no data lost if applied) to the specified Material.

A SkullMeta would not be valid for getClassById sword, but getClassById normal from an enchanted dirt block would.

Return

true if the meta can be applied without losing data, false otherwise

Parameters

meta

Meta to check

material

Material that meta will be applied to

Throws

if the meta was not created by this factory