- All Superinterfaces:
TagReadable
- All Known Subinterfaces:
CommandSender
,Taggable
,TagHandler
- 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
,PositionalDamage
,ServerSender
,SharedInstance
,VillagerInventory
Represents an element which can write
tags
.-
Method Summary
Modifier and TypeMethodDescription<T> T
getAndSetTag
(Tag<T> tag, T value) Reads the current value, and then write the new one.<T> @UnknownNullability T
getAndUpdateTag
(Tag<T> tag, UnaryOperator<@UnknownNullability T> value) default void
<T> void
Writes the specified type.<T> @UnknownNullability T
updateAndGetTag
(Tag<T> tag, UnaryOperator<@UnknownNullability T> value) <T> void
updateTag
(Tag<T> tag, UnaryOperator<@UnknownNullability T> value) Methods inherited from interface net.minestom.server.tag.TagReadable
getTag, hasTag
-
Method Details
-
setTag
Writes the specified type.- Type Parameters:
T
- the tag type- Parameters:
tag
- the tag to writevalue
- the tag value, null to remove
-
removeTag
-
getAndSetTag
Reads the current value, and then write the new one.- Type Parameters:
T
- the tag type- Parameters:
tag
- the tag to writevalue
- the tag value, null to remove- Returns:
- the previous tag value, null if not present
-
updateTag
-
updateAndGetTag
-
getAndUpdateTag
-