mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Fix #1659
This commit is contained in:
parent
bd2cb4b851
commit
9c9d786194
@ -1613,6 +1613,14 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
|
|
||||||
$target = $this->getLevel()->getEntity($packet->target);
|
$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){
|
if($target instanceof Entity and $this->getGamemode() !== Player::VIEW and $this->blocked === false and $this->dead !== true and $target->dead !== true){
|
||||||
$cancelled = false;
|
$cancelled = false;
|
||||||
$item = $this->inventory->getItemInHand();
|
$item = $this->inventory->getItemInHand();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user