Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
デバッグ用のやつ消し忘れた
Browse files Browse the repository at this point in the history
  • Loading branch information
KenCir committed Aug 8, 2021
1 parent 07ac5d6 commit 9030fde
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/OutiServerPlugin/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,12 @@ public function onInteract(PlayerInteractEvent $event)
}
} elseif ($landid) {
if (!$this->plugin->db->CheckLandOwner($landid, $name) and !$this->plugin->db->checkInvite($landid, $name) and $this->plugin->db->CheckLandProtection($landid) and !$player->isOp()) {
echo "OK6" . PHP_EOL;
$event->setCancelled();
}
}
} elseif ($event->getAction() === PlayerInteractEvent::RIGHT_CLICK_AIR) {
if ($landid) {
if (!$this->plugin->db->CheckLandOwner($landid, $name) and !$this->plugin->db->checkInvite($landid, $name) and $this->plugin->db->CheckLandProtection($landid) and !$player->isOp()) {
echo "OK5" . PHP_EOL;
$event->setCancelled();
}
}
Expand Down Expand Up @@ -156,12 +154,10 @@ public function onBreak(BlockBreakEvent $event)
}
elseif ($landid) {
if (!$this->plugin->db->CheckLandOwner($landid, $name) and !$this->plugin->db->checkInvite($landid, $name) and $this->plugin->db->CheckLandProtection($landid) and !$player->isOp()) {
echo "OK" . PHP_EOL;
$event->setCancelled();
}
}
elseif(!$player->isOp() and !in_array($levelname, $this->plugin->config->get('Land_Protection_Allow', array()))) {
echo "OK2" . PHP_EOL;
$event->setCancelled();
}

Expand Down Expand Up @@ -270,16 +266,13 @@ public function onBlockPlace(BlockPlaceEvent $event)
$levelname = $block->getLevel()->getName();
$landid = $this->plugin->db->GetLandId($levelname, (int)$block->x, (int)$block->z);
if(!$player->isOp()) {
echo "OK7" . PHP_EOL;
if($landid) {
if (!$this->plugin->db->CheckLandOwner($landid, $name) and !$this->plugin->db->checkInvite($landid, $name) and !$player->isOp()) {
$event->setCancelled();
echo "OK3" . PHP_EOL;
}
}
else {
$event->setCancelled();
echo "OK4" . PHP_EOL;
}
}
}
Expand Down

0 comments on commit 9030fde

Please sign in to comment.