Skip to content

Commit

Permalink
Update RegionBlocker.php
Browse files Browse the repository at this point in the history
* Update RegionBlocker.php

* Update RegionBlocker.php

Cosmetic changes
  • Loading branch information
Pub4Game authored and falkirks committed Apr 3, 2016
1 parent 0774e8c commit dcd01f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/minereset/RegionBlocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use pocketmine\event\player\PlayerMoveEvent;
use pocketmine\level\Level;
use pocketmine\math\Vector3;
use pocketmine\utils\TextFormat;

class RegionBlocker implements Listener{
/** @var MineReset */
Expand All @@ -19,7 +20,7 @@ public function onPlayerMove(PlayerMoveEvent $event){
foreach($this->activeZones[$event->getPlayer()->getLevel()->getId()] as $zone){
if($this->isInsideZone($event->getTo(), $zone[0], $zone[1])){
$event->setCancelled();
$event->getPlayer()->sendMessage("You can't go in there, a mine is resetting.");
$event->getPlayer()->sendMessage(TextFormat::RED . "You can't go in there, a mine is resetting." . TextFormat::RESET);
return;
}
}
Expand Down Expand Up @@ -52,4 +53,4 @@ protected function clearZone($level, $id){
}
}
}
}
}

0 comments on commit dcd01f7

Please sign in to comment.