mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
event: modernize property declarations where possible
only private fields are modified; protected ones can't be changed in case someone extended the classes
This commit is contained in:
@ -31,18 +31,16 @@ use pocketmine\utils\Utils;
|
||||
* @phpstan-extends EntityEvent<Living>
|
||||
*/
|
||||
class EntityDeathEvent extends EntityEvent{
|
||||
/** @var Item[] */
|
||||
private $drops = [];
|
||||
/** @var int */
|
||||
private $xp;
|
||||
|
||||
/**
|
||||
* @param Item[] $drops
|
||||
*/
|
||||
public function __construct(Living $entity, array $drops = [], int $xp = 0){
|
||||
public function __construct(
|
||||
Living $entity,
|
||||
private array $drops = [],
|
||||
private int $xp = 0
|
||||
){
|
||||
$this->entity = $entity;
|
||||
$this->drops = $drops;
|
||||
$this->xp = $xp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user