mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
do not rely on GameMode::getMagicNumber() to match protocol IDs
This commit is contained in:
@@ -684,7 +684,7 @@ class NetworkSession{
|
||||
}
|
||||
|
||||
public function syncGameMode(GameMode $mode, bool $isRollback = false) : void{
|
||||
$this->sendDataPacket(SetPlayerGameTypePacket::create(TypeConverter::getInstance()->getClientFriendlyGamemode($mode)));
|
||||
$this->sendDataPacket(SetPlayerGameTypePacket::create(TypeConverter::getInstance()->coreGameModeToProtocol($mode)));
|
||||
$this->syncAdventureSettings($this->player);
|
||||
if(!$isRollback){
|
||||
$this->invManager->syncCreative();
|
||||
|
Reference in New Issue
Block a user