mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Updated triggers to handle or dhandle API method
This commit is contained in:
parent
d7b1ae4b47
commit
b9eca491e8
8 changed files with 43 additions and 44 deletions
|
|
@ -88,13 +88,16 @@ class LevelAPI{
|
|||
public function setBlock($x, $y, $z, $block, $meta = 0){
|
||||
$this->map->setBlock($x, $y, $z, $block, $meta);
|
||||
$this->heightMap[$z][$x] = $this->map->getFloor($x, $z);
|
||||
$this->server->trigger("world.block.change", array(
|
||||
if($this->server->api->dhandle("world.block.change", array(
|
||||
"x" => $x,
|
||||
"y" => $y,
|
||||
"z" => $z,
|
||||
"block" => $block,
|
||||
"meta" => $meta,
|
||||
));
|
||||
)) !== false){
|
||||
$this->server->api->block->updateBlock($x, $y, $z, BLOCK_UPDATE_NORMAL);
|
||||
$this->server->api->block->updateBlocksAround($x, $y, $z, BLOCK_UPDATE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
public function getOrderedChunk($X, $Z, $columnsPerPacket = 2){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue