mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Fixed player flags (now can sleep!)
This commit is contained in:
@ -42,10 +42,10 @@ use pocketmine\utils\UUID;
|
||||
|
||||
class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
|
||||
const DATA_PLAYER_FLAG_SLEEP = 1; //TODO: CHECK
|
||||
const DATA_PLAYER_FLAG_SLEEP = 1;
|
||||
const DATA_PLAYER_FLAG_DEAD = 2; //TODO: CHECK
|
||||
|
||||
const DATA_PLAYER_FLAGS = 16; //TODO: CHECK
|
||||
const DATA_PLAYER_FLAGS = 27;
|
||||
|
||||
const DATA_PLAYER_BED_POSITION = 29;
|
||||
|
||||
@ -254,7 +254,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
|
||||
protected function initEntity(){
|
||||
|
||||
$this->setDataFlag(self::DATA_PLAYER_FLAGS, self::DATA_PLAYER_FLAG_SLEEP, false);
|
||||
$this->setDataFlag(self::DATA_PLAYER_FLAGS, self::DATA_PLAYER_FLAG_SLEEP, false, self::DATA_TYPE_BYTE);
|
||||
$this->setDataProperty(self::DATA_PLAYER_BED_POSITION, self::DATA_TYPE_POS, [0, 0, 0], false);
|
||||
|
||||
$this->inventory = new PlayerInventory($this);
|
||||
|
Reference in New Issue
Block a user