mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
add typehints to Metadatable interface and implementations, fix missing return for Block->hasMetadata() reported in #1285
This commit is contained in:
@ -2907,20 +2907,20 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
}
|
||||
|
||||
public function setMetadata($metadataKey, MetadataValue $metadataValue){
|
||||
$this->server->getLevelMetadata()->setMetadata($this, $metadataKey, $metadataValue);
|
||||
public function setMetadata(string $metadataKey, MetadataValue $newMetadataValue){
|
||||
$this->server->getLevelMetadata()->setMetadata($this, $metadataKey, $newMetadataValue);
|
||||
}
|
||||
|
||||
public function getMetadata($metadataKey){
|
||||
public function getMetadata(string $metadataKey){
|
||||
return $this->server->getLevelMetadata()->getMetadata($this, $metadataKey);
|
||||
}
|
||||
|
||||
public function hasMetadata($metadataKey){
|
||||
public function hasMetadata(string $metadataKey) : bool{
|
||||
return $this->server->getLevelMetadata()->hasMetadata($this, $metadataKey);
|
||||
}
|
||||
|
||||
public function removeMetadata($metadataKey, Plugin $plugin){
|
||||
$this->server->getLevelMetadata()->removeMetadata($this, $metadataKey, $plugin);
|
||||
public function removeMetadata(string $metadataKey, Plugin $owningPlugin){
|
||||
$this->server->getLevelMetadata()->removeMetadata($this, $metadataKey, $owningPlugin);
|
||||
}
|
||||
|
||||
public function addEntityMotion(int $chunkX, int $chunkZ, int $entityId, float $x, float $y, float $z){
|
||||
|
Reference in New Issue
Block a user