mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
LoginPacketHandler: use playerInfo directly again, fix another 2 PHPStan level 8 errors
This commit is contained in:
parent
eefb6ae8e7
commit
715fca8986
@ -143,10 +143,10 @@ class LoginPacketHandler extends PacketHandler{
|
||||
if($this->server->getNetwork()->getConnectionCount() > $this->server->getMaxPlayers()){
|
||||
$ev->setKickReason(PlayerPreLoginEvent::KICK_REASON_SERVER_FULL, "disconnectionScreen.serverFull");
|
||||
}
|
||||
if(!$this->server->isWhitelisted($this->session->getPlayerInfo()->getUsername())){
|
||||
if(!$this->server->isWhitelisted($playerInfo->getUsername())){
|
||||
$ev->setKickReason(PlayerPreLoginEvent::KICK_REASON_SERVER_WHITELISTED, "Server is whitelisted");
|
||||
}
|
||||
if($this->server->getNameBans()->isBanned($this->session->getPlayerInfo()->getUsername()) or $this->server->getIPBans()->isBanned($this->session->getIp())){
|
||||
if($this->server->getNameBans()->isBanned($playerInfo->getUsername()) or $this->server->getIPBans()->isBanned($this->session->getIp())){
|
||||
$ev->setKickReason(PlayerPreLoginEvent::KICK_REASON_BANNED, "You are banned");
|
||||
}
|
||||
|
||||
|
@ -485,11 +485,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getUsername\\(\\) on pocketmine\\\\player\\\\PlayerInfo\\|null\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/network/mcpe/handler/LoginPacketHandler.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\StartGamePacket\\:\\:\\$blockTable \\(pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\CacheableNbt\\<pocketmine\\\\nbt\\\\tag\\\\ListTag\\>\\) does not accept pocketmine\\\\network\\\\mcpe\\\\protocol\\\\types\\\\CacheableNbt\\<pocketmine\\\\nbt\\\\tag\\\\ListTag\\>\\|null\\.$#"
|
||||
count: 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user