mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +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:
@ -35,15 +35,12 @@ use pocketmine\world\Position;
|
||||
class EntityTeleportEvent extends EntityEvent implements Cancellable{
|
||||
use CancellableTrait;
|
||||
|
||||
/** @var Position */
|
||||
private $from;
|
||||
/** @var Position */
|
||||
private $to;
|
||||
|
||||
public function __construct(Entity $entity, Position $from, Position $to){
|
||||
public function __construct(
|
||||
Entity $entity,
|
||||
private Position $from,
|
||||
private Position $to
|
||||
){
|
||||
$this->entity = $entity;
|
||||
$this->from = $from;
|
||||
$this->to = $to;
|
||||
}
|
||||
|
||||
public function getFrom() : Position{
|
||||
|
Reference in New Issue
Block a user