Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor
2022-08-27 17:27:15 +01:00
5 changed files with 22 additions and 242 deletions

View File

@@ -31,7 +31,7 @@ use function str_repeat;
final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "4.8.1";
public const BASE_VERSION = "4.8.2";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "beta";

View File

@@ -74,7 +74,7 @@ final class DyeColorIdMap{
}
public function fromId(int $id) : ?DyeColor{
return $this->idToEnum[$id];
return $this->idToEnum[$id] ?? null;
}
public function fromInvertedId(int $id) : ?DyeColor{

View File

@@ -325,8 +325,10 @@ class InventoryManager{
public function onClientRemoveWindow(int $id) : void{
if($id === $this->lastInventoryNetworkId){
$this->remove($id);
$this->player->removeCurrentWindow();
if($id !== $this->pendingCloseWindowId){
$this->remove($id);
$this->player->removeCurrentWindow();
}
}else{
$this->session->getLogger()->debug("Attempted to close inventory with network ID $id, but current is $this->lastInventoryNetworkId");
}