mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added sneaking, sprinting
This commit is contained in:
@ -1666,11 +1666,11 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->server->getPluginManager()->callEvent($ev);
|
||||
if(!$ev->isCancelled()){
|
||||
$target->onUpdate(self::BLOCK_UPDATE_TOUCH);
|
||||
if($target->canBeActivated() === true and $target->onActivate($item, $player) === true){
|
||||
if(!$player->isSneaking() and $target->canBeActivated() === true and $target->onActivate($item, $player) === true){
|
||||
return true;
|
||||
}
|
||||
|
||||
if($item->canBeActivated() and $item->onActivate($this, $player, $block, $target, $face, $fx, $fy, $fz)){
|
||||
if(!$player->isSneaking() and $item->canBeActivated() and $item->onActivate($this, $player, $block, $target, $face, $fx, $fy, $fz)){
|
||||
if($item->getCount() <= 0){
|
||||
$item = Item::get(Item::AIR, 0, 0);
|
||||
|
||||
|
Reference in New Issue
Block a user