mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Fix #1659
This commit is contained in:
parent
bd2cb4b851
commit
9c9d786194
@ -1612,6 +1612,14 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$this->craftingType = 0;
|
||||
|
||||
$target = $this->getLevel()->getEntity($packet->target);
|
||||
|
||||
if(
|
||||
$target instanceof Player and
|
||||
$this->server->getConfigBoolean("pvp",true) === false
|
||||
|
||||
){
|
||||
$cancelled = true;
|
||||
}
|
||||
|
||||
if($target instanceof Entity and $this->getGamemode() !== Player::VIEW and $this->blocked === false and $this->dead !== true and $target->dead !== true){
|
||||
$cancelled = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user