mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Fixed stop crash due to chat API not set
This commit is contained in:
parent
bf5df18170
commit
6cd51dbbf6
1 changed files with 5 additions and 1 deletions
|
|
@ -163,7 +163,11 @@ class PocketMinecraftServer{
|
||||||
if(is_int($reason)){
|
if(is_int($reason)){
|
||||||
$reason = "signal stop";
|
$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->ticker->stop = true;
|
||||||
$this->save(true);
|
$this->save(true);
|
||||||
$this->stop = true;
|
$this->stop = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue