diff --git a/src/event/player/PlayerRespawnEvent.php b/src/event/player/PlayerRespawnEvent.php index 8933aaeb5..5f1f291ac 100644 --- a/src/event/player/PlayerRespawnEvent.php +++ b/src/event/player/PlayerRespawnEvent.php @@ -43,6 +43,9 @@ class PlayerRespawnEvent extends PlayerEvent{ } public function setRespawnPosition(Position $position) : void{ + if(!$position->isValid()){ + throw new \InvalidArgumentException("Spawn position must reference a valid and loaded World"); + } $this->position = $position; } } diff --git a/src/network/mcpe/protocol/EmotePacket.php b/src/network/mcpe/protocol/EmotePacket.php index 00ece97c1..b32e6662d 100644 --- a/src/network/mcpe/protocol/EmotePacket.php +++ b/src/network/mcpe/protocol/EmotePacket.php @@ -30,7 +30,7 @@ use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; class EmotePacket extends DataPacket implements ClientboundPacket, ServerboundPacket{ public const NETWORK_ID = ProtocolInfo::EMOTE_PACKET; - private const FLAG_SERVER = 1 << 0; + public const FLAG_SERVER = 1 << 0; /** @var int */ private $entityRuntimeId; diff --git a/src/stats/SendUsageTask.php b/src/stats/SendUsageTask.php index 3fb0ff207..b88e517b4 100644 --- a/src/stats/SendUsageTask.php +++ b/src/stats/SendUsageTask.php @@ -132,7 +132,7 @@ class SendUsageTask extends AsyncTask{ $data["players"] = [ "count" => count($players), "limit" => $server->getMaxPlayers(), - "currentList" => $players, + "currentList" => array_values($players), "historyList" => array_values($playerList) ];