Interface DistinctiveItem
- All Superinterfaces:
ItemAttribute
- All Known Implementing Classes:
AbstractMonsterSpawner
,BrokenSpawner
,Cooler
,RepairedSpawner
,RestoredBackpack
,SlimefunBackpack
,SoulboundBackpack
Implement this interface for any
SlimefunItem
to prevent
cargo using only its ID when comparing. #canStack is used when
comparing stacks- Author:
- Sefiraat
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canStack
(org.bukkit.inventory.meta.ItemMeta itemMetaOne, org.bukkit.inventory.meta.ItemMeta itemMetaTwo) This method is called bySlimefunUtils.isItemSimilar(org.bukkit.inventory.ItemStack, org.bukkit.inventory.ItemStack, boolean)
when twoSlimefunItemStack
IDs match on a DistinctiveItem and should return if the two items can stack with one another.Methods inherited from interface io.github.thebusybiscuit.slimefun4.core.attributes.ItemAttribute
getId
-
Method Details
-
canStack
boolean canStack(@Nonnull org.bukkit.inventory.meta.ItemMeta itemMetaOne, @Nonnull org.bukkit.inventory.meta.ItemMeta itemMetaTwo) This method is called bySlimefunUtils.isItemSimilar(org.bukkit.inventory.ItemStack, org.bukkit.inventory.ItemStack, boolean)
when twoSlimefunItemStack
IDs match on a DistinctiveItem and should return if the two items can stack with one another.- Parameters:
itemMetaOne
- TheItemMeta
of the first stack being compared.itemMetaTwo
- TheItemMeta
of the second stack being compared.- Returns:
- Whether the two
ItemMeta
s are stackable
-