Merge branch 'stable' of github.com:pmmp/PocketMine-MP into stable

This commit is contained in:
Dylan K. Taylor 2022-03-02 18:30:38 +00:00
commit 7cd394b0fb
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
4 changed files with 20 additions and 17 deletions

View File

@ -27,7 +27,8 @@
## For developers
* [Building and running from source](BUILDING.md)
* [Developer documentation](https://devdoc.pmmp.io) - General documentation for PocketMine-MP plugin developers
* [Latest API documentation](https://jenkins.pmmp.io/job/PocketMine-MP-doc/doxygen/) - Doxygen documentation generated from development
* [Latest release API documentation](https://apidoc.pmmp.io) - Doxygen API documentation generated for each release
* [Latest bleeding-edge API documentation](https://apidoc-dev.pmmp.io) - Doxygen API documentation generated weekly from `next-major` branch
* [DevTools](https://github.com/pmmp/DevTools/) - Development tools plugin for creating plugins
* [ExamplePlugin](https://github.com/pmmp/ExamplePlugin/) - Example plugin demonstrating some basic API features
* [Contributing Guidelines](CONTRIBUTING.md)

26
composer.lock generated
View File

@ -2071,16 +2071,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.11",
"version": "9.2.13",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f"
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f",
"reference": "665a1ac0a763c51afc30d6d130dac0813092b17f",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8",
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8",
"shasum": ""
},
"require": {
@ -2136,7 +2136,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13"
},
"funding": [
{
@ -2144,7 +2144,7 @@
"type": "github"
}
],
"time": "2022-02-18T12:46:09+00:00"
"time": "2022-02-23T17:02:38+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -2389,16 +2389,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.5.14",
"version": "9.5.16",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "1883687169c017d6ae37c58883ca3994cfc34189"
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189",
"reference": "1883687169c017d6ae37c58883ca3994cfc34189",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc",
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc",
"shasum": ""
},
"require": {
@ -2414,7 +2414,7 @@
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.12.1",
"phpunit/php-code-coverage": "^9.2.7",
"phpunit/php-code-coverage": "^9.2.13",
"phpunit/php-file-iterator": "^3.0.5",
"phpunit/php-invoker": "^3.1.1",
"phpunit/php-text-template": "^2.0.3",
@ -2476,7 +2476,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16"
},
"funding": [
{
@ -2488,7 +2488,7 @@
"type": "github"
}
],
"time": "2022-02-18T12:54:07+00:00"
"time": "2022-02-23T17:10:58+00:00"
},
{
"name": "sebastian/cli-parser",

View File

@ -148,18 +148,20 @@ class BrewingStand extends Spawnable implements Container, Nameable{
* @phpstan-return array<int, BrewingRecipe>
*/
private function getBrewableRecipes() : array{
if($this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT)->isNull()){
$ingredient = $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT);
if($ingredient->isNull()){
return [];
}
$recipes = [];
$craftingManager = $this->position->getWorld()->getServer()->getCraftingManager();
foreach([BrewingStandInventory::SLOT_BOTTLE_LEFT, BrewingStandInventory::SLOT_BOTTLE_MIDDLE, BrewingStandInventory::SLOT_BOTTLE_RIGHT] as $slot){
$input = $this->inventory->getItem($slot);
if($input->isNull()){
continue;
}
if(($recipe = $this->position->getWorld()->getServer()->getCraftingManager()->matchBrewingRecipe($input, $this->inventory->getItem(BrewingStandInventory::SLOT_INGREDIENT))) !== null){
if(($recipe = $craftingManager->matchBrewingRecipe($input, $ingredient)) !== null){
$recipes[$slot] = $recipe;
}
}

View File

@ -160,7 +160,7 @@ class Internet{
*
* @param string[]|string $args
* @param string[] $extraHeaders
* @param string|null $err reference parameter, will be set to the output of curl_error(). Use this to retrieve errors that occured during the operation.
* @param string|null $err reference parameter, will be set to the output of curl_error(). Use this to retrieve errors that occurred during the operation.
* @phpstan-param string|array<string, string> $args
* @phpstan-param list<string> $extraHeaders
*/