mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 16:29:40 +00:00
Merge branch '3.5'
This commit is contained in:
commit
ceddf6f5d8
@ -26,6 +26,7 @@ namespace pocketmine;
|
|||||||
use pocketmine\block\Bed;
|
use pocketmine\block\Bed;
|
||||||
use pocketmine\block\Block;
|
use pocketmine\block\Block;
|
||||||
use pocketmine\block\BlockFactory;
|
use pocketmine\block\BlockFactory;
|
||||||
|
use pocketmine\block\UnknownBlock;
|
||||||
use pocketmine\command\Command;
|
use pocketmine\command\Command;
|
||||||
use pocketmine\command\CommandSender;
|
use pocketmine\command\CommandSender;
|
||||||
use pocketmine\entity\effect\Effect;
|
use pocketmine\entity\effect\Effect;
|
||||||
@ -2126,6 +2127,9 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
|
|
||||||
public function pickBlock(Vector3 $pos, bool $addTileNBT) : bool{
|
public function pickBlock(Vector3 $pos, bool $addTileNBT) : bool{
|
||||||
$block = $this->level->getBlock($pos);
|
$block = $this->level->getBlock($pos);
|
||||||
|
if($block instanceof UnknownBlock){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$item = $block->getPickedItem();
|
$item = $block->getPickedItem();
|
||||||
if($addTileNBT){
|
if($addTileNBT){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user