mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
fixing stop message to discord
This commit is contained in:
parent
7b12bc749c
commit
867b497c11
1 changed files with 4 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ class PocketMinecraftServer{
|
|||
}
|
||||
console("[INFO] Loading extra.properties...");
|
||||
$this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, array(
|
||||
"version" => "3",
|
||||
"version" => "4",
|
||||
"enable-explosions" => true,
|
||||
"enable-rail-connection" => false,
|
||||
"save-player-data" => true,
|
||||
|
|
@ -85,6 +85,7 @@ class PocketMinecraftServer{
|
|||
));
|
||||
Explosion::$enableExplosions = $this->extraprops->get("enable-explosions");
|
||||
RailBlock::$shouldconnectrails = $this->extraprops->get("enable-rail-connection"); //Rail connection in config
|
||||
|
||||
if($this->extraprops->get("discord-msg") == true){
|
||||
if($this->extraprops->get("discord-webhook-url") !== "none"){
|
||||
console("[INFO] Discord Logger is enabled.");
|
||||
|
|
@ -213,6 +214,8 @@ class PocketMinecraftServer{
|
|||
* @param string $reason
|
||||
*/
|
||||
public function close($reason = "server stop"){
|
||||
$this->send2Discord('[INFO] Server stopped!');
|
||||
usleep(2);
|
||||
if($this->stop !== true){
|
||||
if(is_int($reason)){
|
||||
$reason = "signal stop";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue