mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39: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)){
|
||||
$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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue