mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
GameMode is now an enum
This commit is contained in:
@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\network\mcpe;
|
||||
|
||||
use pocketmine\GameMode;
|
||||
use pocketmine\network\AdvancedNetworkInterface;
|
||||
use pocketmine\network\BadPacketException;
|
||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||
@ -210,7 +209,7 @@ class RakLibInterface implements ServerInstance, AdvancedNetworkInterface{
|
||||
$info->getMaxPlayerCount(),
|
||||
$this->rakLib->getServerId(),
|
||||
$this->server->getName(),
|
||||
GameMode::toString($this->server->getGamemode())
|
||||
$this->server->getGamemode()->getEnglishName()
|
||||
]) . ";"
|
||||
);
|
||||
}
|
||||
|
@ -468,7 +468,7 @@ class SimpleSessionHandler extends SessionHandler{
|
||||
}
|
||||
|
||||
public function handleSetPlayerGameType(SetPlayerGameTypePacket $packet) : bool{
|
||||
if($packet->gamemode !== $this->player->getGamemode()){
|
||||
if($packet->gamemode !== $this->player->getGamemode()->getMagicNumber()){
|
||||
//Set this back to default. TODO: handle this properly
|
||||
$this->player->sendGamemode();
|
||||
$this->player->sendSettings();
|
||||
|
Reference in New Issue
Block a user