This commit is contained in:
Dylan K. Taylor 2017-02-15 14:58:41 +00:00
parent 1908ed5812
commit 5c281c6435
2 changed files with 5 additions and 4 deletions

View File

@ -21,6 +21,7 @@
namespace pocketmine\block;
use pocketmine\event\TranslationContainer;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\math\AxisAlignedBB;
@ -65,7 +66,7 @@ class Bed extends Transparent{
$isNight = ($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE);
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;
}
@ -94,7 +95,7 @@ class Bed extends Transparent{
}
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;
@ -162,4 +163,4 @@ class Bed extends Transparent{
];
}
}
}

@ -1 +1 @@
Subproject commit 0ad9ce517f2d45ef27bd482ed3db2ff987c63e30
Subproject commit 54473084f59ad4fd6d78e6666c7afcd11d3992ab