mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Improved event checking on PlayerInteractEvent
This commit is contained in:
parent
45dbb3f828
commit
f9d5c5bd37
@ -1099,7 +1099,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
if($target->isActivable === true and $target->onActivate($item, $player) === true){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if($item->isActivable and $item->onActivate($this, $player, $block, $target, $face, $fx, $fy, $fz)){
|
||||
if($item->getCount() <= 0){
|
||||
@ -1108,6 +1107,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}elseif($target->isActivable === true and $target->onActivate($item, $player) === true){
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user