mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Add API methods: Entity::isInvisible(), Entity::setInvisible() (#1930)
* Make use of the API function in Effect class
This commit is contained in:
@ -655,6 +655,14 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
$this->setGenericFlag(self::DATA_FLAG_IMMOBILE, $value);
|
||||
}
|
||||
|
||||
public function isInvisible() : bool{
|
||||
return $this->getGenericFlag(self::DATA_FLAG_INVISIBLE);
|
||||
}
|
||||
|
||||
public function setInvisible(bool $value = true) : void{
|
||||
$this->setGenericFlag(self::DATA_FLAG_INVISIBLE, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the entity is able to climb blocks such as ladders or vines.
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user