mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Merged #103
This commit is contained in:
parent
1908ed5812
commit
5c281c6435
@ -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
|
Loading…
x
Reference in New Issue
Block a user