mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Merged #103
This commit is contained in:
parent
1908ed5812
commit
5c281c6435
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\event\TranslationContainer;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
@ -65,7 +66,7 @@ class Bed extends Transparent{
|
|||||||
$isNight = ($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE);
|
$isNight = ($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE);
|
||||||
|
|
||||||
if($player instanceof Player and !$isNight){
|
if($player instanceof Player and !$isNight){
|
||||||
$player->sendMessage(TextFormat::GRAY . "You can only sleep at night");
|
$player->sendMessage(new TranslationContainer(TextFormat::GRAY . "%tile.bed.noSleep"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +95,7 @@ class Bed extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($player instanceof Player and $player->sleepOn($b) === false){
|
if($player instanceof Player and $player->sleepOn($b) === false){
|
||||||
$player->sendMessage(TextFormat::GRAY . "This bed is occupied");
|
$player->sendMessage(new TranslationContainer(TextFormat::GRAY . "%tile.bed.occupied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0ad9ce517f2d45ef27bd482ed3db2ff987c63e30
|
Subproject commit 54473084f59ad4fd6d78e6666c7afcd11d3992ab
|
Loading…
x
Reference in New Issue
Block a user