Interface Equipable
- All Known Subinterfaces:
- Agent,- Allay,- Ambient,- Animal,- Aquatic,- Armadillo,- ArmorEquipable,- ArmorStand,- Axolotl,- Bat,- Bee,- Blaze,- Bogged,- Breeze,- Camel,- Cat,- CaveSpider,- Chicken,- ClientPlayer,- Cod,- Cow,- Creaking,- Creeper,- Dolphin,- Donkey,- Drowned,- ElderGuardian,- EnderDragon,- Enderman,- Endermite,- Evoker,- Fish,- Fox,- Frog,- Ghast,- Giant,- GlowSquid,- Goat,- Golem,- Guardian,- Hoglin,- Horse,- HorseLike,- Human,- Humanoid,- Husk,- Illager,- Illusioner,- IronGolem,- Llama,- LocalPlayer,- MagmaCube,- Monster,- Mooshroom,- Mule,- Ocelot,- PackHorse,- Panda,- Parrot,- PathfinderAgent,- Patroller,- Phantom,- Pig,- Piglin,- PiglinBrute,- PiglinLike,- Pillager,- Player,- PolarBear,- Pufferfish,- Rabbit,- Raider,- RangedAgent,- Ravager,- RemotePlayer,- Salmon,- SchoolingFish,- ServerPlayer,- Sheep,- Shulker,- Silverfish,- Skeleton,- SkeletonHorse,- SkeletonLike,- Slime,- Sniffer,- SnowGolem,- Spellcaster,- Spider,- Squid,- Stray,- Strider,- Tadpole,- TameableAnimal,- TraderLlama,- TropicalFish,- Turtle,- User,- Vex,- Villager,- VillagerLike,- Vindicator,- WanderingTrader,- Warden,- Witch,- Wither,- WitherSkeleton,- Wolf,- Zoglin,- Zombie,- ZombieHorse,- ZombieVillager,- ZombifiedPiglin
public interface Equipable
Represents the holder of a 
EquipmentInventory.- 
Method SummaryModifier and TypeMethodDescriptiondefault booleancanEquip(Supplier<? extends EquipmentType> type) default booleancanEquip(Supplier<? extends EquipmentType> type, ItemStackLike equipment) booleancanEquip(EquipmentType type) Gets whether thisEquipablecan equip equipment of the specified type (eg.booleancanEquip(EquipmentType type, ItemStackLike equipment) Gets whether thisEquipablecan equip the supplied equipment in its slot of the specified type (eg.default booleanequip(Supplier<? extends EquipmentType> type, ItemStackLike equipment) booleanequip(EquipmentType type, ItemStackLike equipment) Sets the item currently equipped by theEquipablein the specified slot, if the equipable has such a slot.Returns the EquipmentInventory this is holding.equipped(Supplier<? extends EquipmentType> type) equipped(EquipmentType type) Gets the item currently equipped by thisEquipablein the specified slot.
- 
Method Details- 
equipmentEquipmentInventory equipment()Returns the EquipmentInventory this is holding.- Returns:
- The EquipmentInventory this is holding
 
- 
canEquipGets whether thisEquipablecan equip equipment of the specified type (eg. whether callingequip(org.spongepowered.api.item.inventory.equipment.EquipmentType, org.spongepowered.api.item.inventory.ItemStackLike)will fail because the equipable doesn't have this type of slot.- Parameters:
- type- The type of equipment slot to query
- Returns:
- true if this equipable can equip items of the specified type
 
- 
canEquip
- 
canEquipGets whether thisEquipablecan equip the supplied equipment in its slot of the specified type (eg. whether callingequip(org.spongepowered.api.item.inventory.equipment.EquipmentType, org.spongepowered.api.item.inventory.ItemStackLike)with the specified slot type and item will succeed)- Parameters:
- type- The type of equipment slot to query
- equipment- The equipment to check for
- Returns:
- true if can equip the supplied equipment
 
- 
canEquip
- 
equippedGets the item currently equipped by thisEquipablein the specified slot.- Parameters:
- type- The type of equipment slot to query
- Returns:
- The item in the equipped slot, if available
 
- 
equipped
- 
equipSets the item currently equipped by theEquipablein the specified slot, if the equipable has such a slot.- Parameters:
- type- The type of equipment slot to set
- equipment- The equipment to set the any equipped item
- Returns:
- true if the item was successfully equipped, false if the item could not be equipped because the equipable doesn't support the specified equipment type or because the item was incompatible with the specified slot.
 
- 
equip
 
-