Skip to content

Commit

Permalink
Solid -> Opaque
Browse files Browse the repository at this point in the history
  • Loading branch information
brokiem committed Feb 25, 2021
1 parent 7a7d9d7 commit ed8a4cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ tap-sneak-button-message: "Tap the sneak button to stand up"
cannot-be-occupied-lay: "&cYou can't lay here!"

seat-already-in-use: "&cThis seat is occupied!"
cannot-be-occupied-sit: "&cYou can only sit on the Solid, Stair, or Slab block!"
cannot-be-occupied-sit: "&cYou can only sit on the Opaque, Stair, or Slab block!"
#-------- -------- --------#
...
6 changes: 3 additions & 3 deletions src/brokiem/simplelay/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace brokiem\simplelay;

use pocketmine\block\Slab;
use pocketmine\block\Opaque as Solid;
use pocketmine\block\Opaque;
use pocketmine\block\Stair;
use pocketmine\event\block\BlockBreakEvent;
use pocketmine\event\entity\EntityTeleportEvent;
Expand Down Expand Up @@ -72,7 +72,7 @@ public function onPlayerJoin(PlayerJoinEvent $event): void

if ($block instanceof Stair or $block instanceof Slab) {
$pos = $block->getPos()->add(0.5, 1.5, 0.5);
} elseif ($block instanceof Solid) {
} elseif ($block instanceof Opaque) {
$pos = $block->getPos()->add(0.5, 2.1, 0.5);
} else {
return;
Expand Down Expand Up @@ -185,7 +185,7 @@ public function onBlockBreak(BlockBreakEvent $event): void

if ($block instanceof Stair or $block instanceof Slab) {
$pos = $block->getPos()->add(0.5, 1.5, 0.5);
} elseif ($block instanceof Solid) {
} elseif ($block instanceof Opaque) {
$pos = $block->getPos()->add(0.5, 2.1, 0.5);
} else {
return;
Expand Down
6 changes: 3 additions & 3 deletions src/brokiem/simplelay/SimpleLay.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\entity\Entity;
use pocketmine\block\Opaque as Solid;
use pocketmine\block\Opaque;
use pocketmine\entity\EntityDataHelper;
use pocketmine\entity\EntityFactory;
use pocketmine\network\mcpe\protocol\AddActorPacket;
Expand Down Expand Up @@ -270,10 +270,10 @@ public function sit(Player $player, Block $block): void
{
if ($block instanceof Stair or $block instanceof Slab) {
$pos = $block->getPos()->add(0.5, 1.5, 0.5);
} elseif ($block instanceof Solid) {
} elseif ($block instanceof Opaque) {
$pos = $block->getPos()->add(0.5, 2.1, 0.5);
} else {
$player->sendMessage(TextFormat::colorize($this->getConfig()->get("cannot-be-occupied-sit", "&cYou can only sit on the Solid, Stair, or Slab block!")));
$player->sendMessage(TextFormat::colorize($this->getConfig()->get("cannot-be-occupied-sit", "&cYou can only sit on the Opaque, Stair, or Slab block!")));
return;
}

Expand Down

0 comments on commit ed8a4cf

Please sign in to comment.