Fixed stop crash due to chat API not set

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-23 19:37:28 +01:00
parent bf5df18170
commit 6cd51dbbf6

View File

@ -163,7 +163,11 @@ class PocketMinecraftServer{
if(is_int($reason)){
$reason = "signal stop";
}
$this->api->chat->send(false, "Stopping server...");
if(($this->api instanceof ServerAPI) === true){
if(($this->api->chat instanceof ChatAPI) === true){
$this->api->chat->send(false, "Stopping server...");
}
}
//$this->ticker->stop = true;
$this->save(true);
$this->stop = true;