Merge branch 'master' into mcpe-1.2

This commit is contained in:
Dylan K. Taylor
2017-08-16 12:31:12 +01:00
12 changed files with 115 additions and 46 deletions

View File

@ -1902,20 +1902,21 @@ abstract class Entity extends Location implements Metadatable{
$this->close();
}
public function setMetadata($metadataKey, MetadataValue $metadataValue){
$this->server->getEntityMetadata()->setMetadata($this, $metadataKey, $metadataValue);
public function setMetadata(string $metadataKey, MetadataValue $newMetadataValue){
$this->server->getEntityMetadata()->setMetadata($this, $metadataKey, $newMetadataValue);
}
public function getMetadata($metadataKey){
public function getMetadata(string $metadataKey){
return $this->server->getEntityMetadata()->getMetadata($this, $metadataKey);
}
public function hasMetadata($metadataKey){
public function hasMetadata(string $metadataKey) : bool{
return $this->server->getEntityMetadata()->hasMetadata($this, $metadataKey);
}
public function removeMetadata($metadataKey, Plugin $plugin){
$this->server->getEntityMetadata()->removeMetadata($this, $metadataKey, $plugin);
public function removeMetadata(string $metadataKey, Plugin $owningPlugin){
$this->server->getEntityMetadata()->removeMetadata($this, $metadataKey, $owningPlugin);
}
public function __toString(){