Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Feb 26, 2024
2 parents 096e338 + 34a5f91 commit 85d6a6d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main-php-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP
uses: pmmp/setup-php-action@3.0.0
uses: pmmp/setup-php-action@3.1.0
with:
php-version: ${{ inputs.php }}
install-path: "./bin"
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP
uses: pmmp/setup-php-action@3.0.0
uses: pmmp/setup-php-action@3.1.0
with:
php-version: ${{ inputs.php }}
install-path: "./bin"
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
submodules: true

- name: Setup PHP
uses: pmmp/setup-php-action@3.0.0
uses: pmmp/setup-php-action@3.1.0
with:
php-version: ${{ inputs.php }}
install-path: "./bin"
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP
uses: pmmp/setup-php-action@3.0.0
uses: pmmp/setup-php-action@3.1.0
with:
php-version: ${{ inputs.php }}
install-path: "./bin"
Expand Down
6 changes: 6 additions & 0 deletions changelogs/5.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ Released 23rd February 2024.

## Internals
- Updated GitHub Actions versions to get rid of deprecation warnings.

# 5.11.2
Released 26th February 2024.

## Fixes
- Added extra checks for `BookEditPacket` handling.
2 changes: 1 addition & 1 deletion src/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

final class VersionInfo{
public const NAME = "PocketMine-MP";
public const BASE_VERSION = "5.11.2";
public const BASE_VERSION = "5.11.3";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "stable";

Expand Down
6 changes: 5 additions & 1 deletion src/network/mcpe/handler/InGamePacketHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,12 @@ private function checkBookText(string $string, string $fieldName, int $softLimit
}

public function handleBookEdit(BookEditPacket $packet) : bool{
$inventory = $this->player->getInventory();
if(!$inventory->slotExists($packet->inventorySlot)){
return false;
}
//TODO: break this up into book API things
$oldBook = $this->player->getInventory()->getItem($packet->inventorySlot);
$oldBook = $inventory->getItem($packet->inventorySlot);
if(!($oldBook instanceof WritableBook)){
return false;
}
Expand Down

0 comments on commit 85d6a6d

Please sign in to comment.