mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Added stop signal check
This commit is contained in:
parent
8bc40d2d9c
commit
310701f7e9
1 changed files with 3 additions and 0 deletions
|
|
@ -161,6 +161,9 @@ class PocketMinecraftServer{
|
||||||
|
|
||||||
public function close($reason = "stop"){
|
public function close($reason = "stop"){
|
||||||
if($this->stop !== true){
|
if($this->stop !== true){
|
||||||
|
if(is_int($reason)){
|
||||||
|
$reason = "signal stop";
|
||||||
|
}
|
||||||
$this->api->chat->send(false, "Stopping server...");
|
$this->api->chat->send(false, "Stopping server...");
|
||||||
$this->ticker->stop = true;
|
$this->ticker->stop = true;
|
||||||
$this->save(true);
|
$this->save(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue