mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 11:27: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{
|
||||
|
||||
/** @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 string $name Translation key used for effect name
|
||||
* @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)
|
||||
*/
|
||||
public function __construct(int $internalRuntimeId, string $name, Color $color, bool $isBad = false, bool $hasBubbles = true){
|
||||
$this->internalRuntimeId = $internalRuntimeId;
|
||||
$this->name = $name;
|
||||
$this->color = $color;
|
||||
$this->bad = $isBad;
|
||||
$this->hasBubbles = $hasBubbles;
|
||||
}
|
||||
public function __construct(
|
||||
protected int $internalRuntimeId,
|
||||
protected string $name,
|
||||
protected Color $color,
|
||||
protected bool $bad = false,
|
||||
protected bool $hasBubbles = true
|
||||
){}
|
||||
|
||||
/**
|
||||
* Returns a unique identifier for this effect type
|
||||
|
Loading…
x
Reference in New Issue
Block a user