mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Heap of bugfixes, cleanup and PHP 7 upgrades
This commit is contained in:
@ -1170,7 +1170,7 @@ class Server{
|
||||
}
|
||||
}
|
||||
|
||||
return $this->propertyCache[$variable] === null ? $defaultValue : $this->propertyCache[$variable];
|
||||
return $this->propertyCache[$variable] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2264,14 +2264,14 @@ class Server{
|
||||
$pk = new PlayerListPacket();
|
||||
$pk->type = PlayerListPacket::TYPE_ADD;
|
||||
$pk->entries[] = [$uuid, $entityId, $name, $skinId, $skinData];
|
||||
$this->broadcastPacket($players === null ? $this->playerList : $players, $pk);
|
||||
$this->broadcastPacket($players ?? $this->playerList, $pk);
|
||||
}
|
||||
|
||||
public function removePlayerListData(UUID $uuid, array $players = null){
|
||||
$pk = new PlayerListPacket();
|
||||
$pk->type = PlayerListPacket::TYPE_REMOVE;
|
||||
$pk->entries[] = [$uuid];
|
||||
$this->broadcastPacket($players === null ? $this->playerList : $players, $pk);
|
||||
$this->broadcastPacket($players ?? $this->playerList, $pk);
|
||||
}
|
||||
|
||||
public function sendFullPlayerListData(Player $p){
|
||||
|
Reference in New Issue
Block a user