Package net.minestom.server.data
Interface DataContainer
- All Known Implementing Classes:
AnvilInventory
,BeaconInventory
,BrewingStandInventory
,Chunk
,DamageType
,DynamicChunk
,EnchantmentTableInventory
,Entity
,EntityAreaEffectCloud
,EntityArmorStand
,EntityBat
,EntityBee
,EntityBlaze
,EntityBoat
,EntityCat
,EntityCaveSpider
,EntityChicken
,EntityCow
,EntityCreature
,EntityCreeper
,EntityDamage
,EntityDolphin
,EntityEndermite
,EntityEyeOfEnder
,EntityFox
,EntityGhast
,EntityGiant
,EntityGuardian
,EntityIronGolem
,EntityItemFrame
,EntityMooshroom
,EntityOcelot
,EntityPanda
,EntityPhantom
,EntityPig
,EntityPolarBear
,EntityPotion
,EntityProjectileDamage
,EntityRabbit
,EntitySilverfish
,EntitySlime
,EntitySnowman
,EntitySpider
,EntityWitch
,EntityZombie
,EntityZombifiedPiglin
,ExperienceOrb
,FakePlayer
,FurnaceInventory
,Instance
,InstanceContainer
,Inventory
,ItemEntity
,ItemStack
,LivingEntity
,ObjectEntity
,Player
,PlayerInventory
,SharedInstance
,VillagerInventory
public interface DataContainer
Represents an element which can have a
Data
attached to it.
The data will always be optional and can therefore be null.
-
Method Details
-
getData
Gets theData
of this container.A
DataContainer
data is always optional, meaning that this will be null if no data has been defined.- Returns:
- the
Data
of this container, can be null
-
setData
Sets theData
of this container.Default implementations are
DataImpl
andSerializableDataImpl
depending on your use-case.- Parameters:
data
- the newData
of this container, null to remove it
-