mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
Fixed player.block.activate
This commit is contained in:
parent
1cf2741f96
commit
32d658122b
1 changed files with 2 additions and 0 deletions
|
|
@ -307,6 +307,8 @@ class BlockAPI{
|
||||||
if($target->isActivable === true){
|
if($target->isActivable === true){
|
||||||
if($this->server->api->dhandle("player.block.activate", array("player" => $player, "block" => $block, "target" => $target, "item" => $item)) !== false and $target->onActivate($item, $player) === true){
|
if($this->server->api->dhandle("player.block.activate", array("player" => $player, "block" => $block, "target" => $target, "item" => $item)) !== false and $target->onActivate($item, $player) === true){
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
return $this->cancelAction($target, $player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue