Skip to content

Commit

Permalink
Fixed lily pad not logged when placed.
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed Jun 4, 2020
1 parent 3826556 commit bbc1a6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/matcracker/BedcoreProtect/listeners/BlockListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use pocketmine\block\Lava;
use pocketmine\block\Liquid;
use pocketmine\block\Water;
use pocketmine\block\WaterLily;
use pocketmine\event\block\BlockBreakEvent;
use pocketmine\event\block\BlockBurnEvent;
use pocketmine\event\block\BlockFormEvent;
Expand Down Expand Up @@ -116,6 +117,9 @@ public function trackBlockPlace(BlockPlaceEvent $event): void

if ($block instanceof Fallable) {
$this->blocksQueries->addBlockLogByEntity($player, $replacedBlock, $block, Action::PLACE());
} elseif ($block instanceof WaterLily && $replacedBlock instanceof Water) {
$upPos = $block->getSide(Vector3::SIDE_UP)->asPosition();
$this->blocksQueries->addBlockLogByEntity($player, $this->air, $block, Action::PLACE(), $upPos);
} else {
//HACK: Remove when issue PMMP#1760 is fixed (never).
$this->plugin->getScheduler()->scheduleDelayedTask(
Expand Down

0 comments on commit bbc1a6e

Please sign in to comment.