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 TypeMethodDescriptionbooleancanStack(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 twoSlimefunItemStackIDs 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 twoSlimefunItemStackIDs match on a DistinctiveItem and should return if the two items can stack with one another.- Parameters:
itemMetaOne- TheItemMetaof the first stack being compared.itemMetaTwo- TheItemMetaof the second stack being compared.- Returns:
- Whether the two
ItemMetas are stackable
-