Class LazyMetadataValue

java.lang.Object
org.bukkit.metadata.MetadataValueAdapter
org.bukkit.metadata.LazyMetadataValue
All Implemented Interfaces:
MetadataValue
Direct Known Subclasses:
FixedMetadataValue

public class LazyMetadataValue extends MetadataValueAdapter
The LazyMetadataValue class implements a type of metadata that is not computed until another plugin asks for it.

By making metadata values lazy, no computation is done by the providing plugin until absolutely necessary (if ever). Additionally, LazyMetadataValue objects cache their values internally unless overridden by a LazyMetadataValue.CacheStrategy or invalidated at the individual or plugin level. Once invalidated, the LazyMetadataValue will recompute its value when asked.