From d42217ff57f6b95e1882c4e0b0fd9e3522bfd177 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 19 Apr 2020 14:26:22 +0000 Subject: [PATCH 1/2] Bump phpstan/phpstan-phpunit from 0.12.6 to 0.12.8 (#3421) --- composer.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.lock b/composer.lock index 78a37fed9..b38710df4 100644 --- a/composer.lock +++ b/composer.lock @@ -517,21 +517,21 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "0.12.6", + "version": "0.12.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "26394996368b6d033d012547d3197f4e07e23021" + "reference": "7232c17e2493dc598173da784477ce0afb2c4e0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/26394996368b6d033d012547d3197f4e07e23021", - "reference": "26394996368b6d033d012547d3197f4e07e23021", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/7232c17e2493dc598173da784477ce0afb2c4e0e", + "reference": "7232c17e2493dc598173da784477ce0afb2c4e0e", "shasum": "" }, "require": { "php": "~7.1", - "phpstan/phpstan": "^0.12.4" + "phpstan/phpstan": "^0.12.6" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -569,7 +569,7 @@ "MIT" ], "description": "PHPUnit extensions and rules for PHPStan", - "time": "2020-01-10T12:07:21+00:00" + "time": "2020-04-17T08:04:10+00:00" }, { "name": "phpstan/phpstan-strict-rules", From 34a3e0d8b1a4558433a987b201e87565a7a91575 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 19 Apr 2020 15:37:10 +0100 Subject: [PATCH 2/2] Level: fix sneaking use-item logic (thanks @95CivicSi) inspired by, but closes #3403 fixes #3401 fixes #2539 fixes #1904 --- src/pocketmine/level/Level.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index 80695ab86..b1cdb5f89 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -1862,11 +1862,11 @@ class Level implements ChunkManager, Metadatable{ $ev->call(); if(!$ev->isCancelled()){ - if(!$player->isSneaking() and $blockClicked->onActivate($item, $player)){ + if((!$player->isSneaking() or $item->isNull()) and $blockClicked->onActivate($item, $player)){ return true; } - if(!$player->isSneaking() and $item->onActivate($player, $blockReplace, $blockClicked, $face, $clickVector)){ + if($item->onActivate($player, $blockReplace, $blockClicked, $face, $clickVector)){ return true; } }else{