PocketMine
MetadataStore Class Reference
Inheritance diagram for MetadataStore:
BlockMetadataStore EntityMetadataStore LevelMetadataStore PlayerMetadataStore

Public Member Functions

 setMetadata ($subject, $metadataKey, MetadataValue $newMetadataValue)
 
 getMetadata ($subject, $metadataKey)
 
 hasMetadata ($subject, $metadataKey)
 
 removeMetadata ($subject, $metadataKey, Plugin $owningPlugin)
 
 disambiguate (Metadatable $subject, $metadataKey)
 

Member Function Documentation

disambiguate ( Metadatable  $subject,
  $metadataKey 
)
abstract

Creates a unique name for the object receiving metadata by combining unique data from the subject with a metadataKey.

Parameters
Metadatable$subject
string$metadataKey
Returns
string
Exceptions
getMetadata (   $subject,
  $metadataKey 
)

Returns all metadata values attached to an object. If multiple have attached metadata, each will value will be included.

Parameters
mixed$subject
string$metadataKey
Returns
MetadataValue[]
Exceptions
hasMetadata (   $subject,
  $metadataKey 
)

Tests to see if a metadata attribute has been set on an object.

Parameters
mixed$subject
string$metadataKey
Returns
bool
Exceptions
removeMetadata (   $subject,
  $metadataKey,
Plugin  $owningPlugin 
)

Removes a metadata item owned by a plugin from a subject.

Parameters
mixed$subject
string$metadataKey
Plugin$owningPlugin
Exceptions
setMetadata (   $subject,
  $metadataKey,
MetadataValue  $newMetadataValue 
)

Adds a metadata value to an object.

Parameters
mixed$subject
string$metadataKey
MetadataValue$newMetadataValue
Exceptions

The documentation for this class was generated from the following file: