mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 09:39:56 +00:00
FloatingTextParticle: import cleanup & typehints
This commit is contained in:
parent
9bd7f771d3
commit
030cc4afb0
@ -24,11 +24,9 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\level\particle;
|
namespace pocketmine\level\particle;
|
||||||
|
|
||||||
use pocketmine\entity\Entity;
|
use pocketmine\entity\Entity;
|
||||||
use pocketmine\entity\Item as ItemEntity;
|
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\item\ItemFactory;
|
use pocketmine\item\ItemFactory;
|
||||||
use pocketmine\math\Vector3;
|
use pocketmine\math\Vector3;
|
||||||
use pocketmine\network\mcpe\protocol\AddEntityPacket;
|
|
||||||
use pocketmine\network\mcpe\protocol\AddPlayerPacket;
|
use pocketmine\network\mcpe\protocol\AddPlayerPacket;
|
||||||
use pocketmine\network\mcpe\protocol\RemoveEntityPacket;
|
use pocketmine\network\mcpe\protocol\RemoveEntityPacket;
|
||||||
use pocketmine\utils\UUID;
|
use pocketmine\utils\UUID;
|
||||||
@ -46,26 +44,26 @@ class FloatingTextParticle extends Particle{
|
|||||||
* @param string $text
|
* @param string $text
|
||||||
* @param string $title
|
* @param string $title
|
||||||
*/
|
*/
|
||||||
public function __construct(Vector3 $pos, $text, $title = ""){
|
public function __construct(Vector3 $pos, string $text, string $title = ""){
|
||||||
parent::__construct($pos->x, $pos->y, $pos->z);
|
parent::__construct($pos->x, $pos->y, $pos->z);
|
||||||
$this->text = $text;
|
$this->text = $text;
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setText($text){
|
public function setText(string $text) : void{
|
||||||
$this->text = $text;
|
$this->text = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTitle($title){
|
public function setTitle(string $title) : void{
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isInvisible(){
|
public function isInvisible() : bool{
|
||||||
return $this->invisible;
|
return $this->invisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setInvisible($value = true){
|
public function setInvisible(bool $value = true){
|
||||||
$this->invisible = (bool) $value;
|
$this->invisible = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user