mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Modernize private property declarations in src/entity
This commit is contained in:
@ -28,23 +28,12 @@ use pocketmine\utils\Limits;
|
||||
use function max;
|
||||
|
||||
class EffectInstance{
|
||||
/** @var Effect */
|
||||
private $effectType;
|
||||
|
||||
/** @var int */
|
||||
private $duration;
|
||||
|
||||
/** @var int */
|
||||
private $amplifier;
|
||||
|
||||
/** @var bool */
|
||||
private $visible;
|
||||
|
||||
/** @var bool */
|
||||
private $ambient;
|
||||
|
||||
/** @var Color */
|
||||
private $color;
|
||||
private Effect $effectType;
|
||||
private int $duration;
|
||||
private int $amplifier;
|
||||
private bool $visible;
|
||||
private bool $ambient;
|
||||
private Color $color;
|
||||
|
||||
/**
|
||||
* @param int|null $duration Passing null will use the effect type's default duration
|
||||
|
@ -34,9 +34,6 @@ use function spl_object_id;
|
||||
|
||||
class EffectManager{
|
||||
|
||||
/** @var Living */
|
||||
private $entity;
|
||||
|
||||
/** @var EffectInstance[] */
|
||||
protected $effects = [];
|
||||
|
||||
@ -56,8 +53,9 @@ class EffectManager{
|
||||
*/
|
||||
protected $effectRemoveHooks;
|
||||
|
||||
public function __construct(Living $entity){
|
||||
$this->entity = $entity;
|
||||
public function __construct(
|
||||
private Living $entity
|
||||
){
|
||||
$this->bubbleColor = new Color(0, 0, 0, 0);
|
||||
$this->effectAddHooks = new ObjectSet();
|
||||
$this->effectRemoveHooks = new ObjectSet();
|
||||
|
@ -30,9 +30,7 @@ use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\lang\Translatable;
|
||||
|
||||
class PoisonEffect extends Effect{
|
||||
|
||||
/** @var bool */
|
||||
private $fatal;
|
||||
private bool $fatal;
|
||||
|
||||
public function __construct(Translatable|string $name, Color $color, bool $isBad = false, int $defaultDuration = 600, bool $hasBubbles = true, bool $fatal = false){
|
||||
parent::__construct($name, $color, $isBad, $defaultDuration, $hasBubbles);
|
||||
|
Reference in New Issue
Block a user