mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Effect: use promoted properties
This commit is contained in:
parent
078347b44a
commit
8e58beef7f
@ -29,31 +29,20 @@ use pocketmine\entity\Living;
|
|||||||
|
|
||||||
class Effect{
|
class Effect{
|
||||||
|
|
||||||
/** @var int */
|
|
||||||
protected $internalRuntimeId;
|
|
||||||
/** @var string */
|
|
||||||
protected $name;
|
|
||||||
/** @var Color */
|
|
||||||
protected $color;
|
|
||||||
/** @var bool */
|
|
||||||
protected $bad;
|
|
||||||
/** @var bool */
|
|
||||||
protected $hasBubbles;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $internalRuntimeId Internal runtime ID, unique to this effect type. Used for comparisons.
|
* @param int $internalRuntimeId Internal runtime ID, unique to this effect type. Used for comparisons.
|
||||||
* @param string $name Translation key used for effect name
|
* @param string $name Translation key used for effect name
|
||||||
* @param Color $color Color of bubbles given by this effect
|
* @param Color $color Color of bubbles given by this effect
|
||||||
* @param bool $isBad Whether the effect is harmful
|
* @param bool $bad Whether the effect is harmful
|
||||||
* @param bool $hasBubbles Whether the effect has potion bubbles. Some do not (e.g. Instant Damage has its own particles instead of bubbles)
|
* @param bool $hasBubbles Whether the effect has potion bubbles. Some do not (e.g. Instant Damage has its own particles instead of bubbles)
|
||||||
*/
|
*/
|
||||||
public function __construct(int $internalRuntimeId, string $name, Color $color, bool $isBad = false, bool $hasBubbles = true){
|
public function __construct(
|
||||||
$this->internalRuntimeId = $internalRuntimeId;
|
protected int $internalRuntimeId,
|
||||||
$this->name = $name;
|
protected string $name,
|
||||||
$this->color = $color;
|
protected Color $color,
|
||||||
$this->bad = $isBad;
|
protected bool $bad = false,
|
||||||
$this->hasBubbles = $hasBubbles;
|
protected bool $hasBubbles = true
|
||||||
}
|
){}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a unique identifier for this effect type
|
* Returns a unique identifier for this effect type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user