Package net.minestom.server.tag
Interface Taggable
- All Superinterfaces:
TagReadable,TagWritable
- All Known Subinterfaces:
CommandSender
- All Known Implementing Classes:
AbstractInventory,AnvilInventory,BeaconInventory,BrewingStandInventory,Chunk,ConsoleSender,Damage,DynamicChunk,EnchantmentTableInventory,Entity,EntityCreature,EntityDamage,EntityProjectile,EntityProjectileDamage,ExperienceOrb,FurnaceInventory,Instance,InstanceContainer,Inventory,ItemEntity,LightingChunk,LivingEntity,Player,PlayerInventory,PlayerProjectile,PositionalDamage,ServerSender,SharedInstance,VillagerInventory
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> @UnknownNullability TReads the specified tag.default booleanReturns if a tag is present.default voiddefault <T> voidWrites the specified type.@NotNull TagHandler
-
Method Details
-
tagHandler
-
getTag
Description copied from interface:TagReadableReads the specified tag.- Specified by:
getTagin interfaceTagReadable- Type Parameters:
T- the tag type- Parameters:
tag- the tag to read- Returns:
- the read tag, null if not present
-
hasTag
Description copied from interface:TagReadableReturns if a tag is present.- Specified by:
hasTagin interfaceTagReadable- Parameters:
tag- the tag to check- Returns:
- true if the tag is present, false otherwise
-
setTag
Description copied from interface:TagWritableWrites the specified type.- Specified by:
setTagin interfaceTagWritable- Type Parameters:
T- the tag type- Parameters:
tag- the tag to writevalue- the tag value, null to remove
-
removeTag
- Specified by:
removeTagin interfaceTagWritable
-