mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Small changes, Ellie
This commit is contained in:
parent
d0a08d16e7
commit
9ef2dc6fe1
@ -92,7 +92,7 @@ class Player{
|
||||
}
|
||||
|
||||
public function save(){
|
||||
if(is_object($this->entity)){
|
||||
if($this->entity instanceof Entity){
|
||||
$this->data["spawn"] = array(
|
||||
"x" => $this->entity->x,
|
||||
"y" => $this->entity->y,
|
||||
@ -521,7 +521,7 @@ class Player{
|
||||
}
|
||||
break;
|
||||
case MC_MOVE_PLAYER:
|
||||
if(is_object($this->entity)){
|
||||
if($this->entity instanceof Entity){
|
||||
$this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]);
|
||||
$this->server->api->dhandle("player.move", $this->entity);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ class PocketMinecraftServer{
|
||||
$this->action(5000000, 'if($this->difficulty < 2){$this->api->dhandle("server.regeneration", 1);}');
|
||||
$this->action(1000000 * 60, '$this->reloadConfig();');
|
||||
$this->action(1000000 * 60 * 10, '$this->custom = array();');
|
||||
if($this->api !== false){
|
||||
if($this->api instanceof ServerAPI){
|
||||
$this->action(1000000 * 80, '$cnt = count($this->clients); if($cnt > 1){$this->api->chat->broadcast("Online (".$cnt."): ".implode(", ",$this->api->player->online()));}');
|
||||
}
|
||||
$this->action(1000000 * 120, '$this->debugInfo(true);');
|
||||
|
@ -319,7 +319,7 @@ class Entity extends stdClass{
|
||||
}
|
||||
|
||||
public function spawn($player){
|
||||
if(!is_object($player)){
|
||||
if(!($player instanceof Player)){
|
||||
$player = $this->server->api->player->get($player);
|
||||
}
|
||||
if($player->eid === $this->eid){
|
||||
|
Loading…
x
Reference in New Issue
Block a user