mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
Added stop signal check
This commit is contained in:
parent
8bc40d2d9c
commit
310701f7e9
@ -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…
x
Reference in New Issue
Block a user