mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +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...");
|
console("[INFO] Loading extra.properties...");
|
||||||
$this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, array(
|
$this->extraprops = new Config(DATA_PATH . "extra.properties", CONFIG_PROPERTIES, array(
|
||||||
"version" => "3",
|
"version" => "4",
|
||||||
"enable-explosions" => true,
|
"enable-explosions" => true,
|
||||||
"enable-rail-connection" => false,
|
"enable-rail-connection" => false,
|
||||||
"save-player-data" => true,
|
"save-player-data" => true,
|
||||||
|
|
@ -85,6 +85,7 @@ class PocketMinecraftServer{
|
||||||
));
|
));
|
||||||
Explosion::$enableExplosions = $this->extraprops->get("enable-explosions");
|
Explosion::$enableExplosions = $this->extraprops->get("enable-explosions");
|
||||||
RailBlock::$shouldconnectrails = $this->extraprops->get("enable-rail-connection"); //Rail connection in config
|
RailBlock::$shouldconnectrails = $this->extraprops->get("enable-rail-connection"); //Rail connection in config
|
||||||
|
|
||||||
if($this->extraprops->get("discord-msg") == true){
|
if($this->extraprops->get("discord-msg") == true){
|
||||||
if($this->extraprops->get("discord-webhook-url") !== "none"){
|
if($this->extraprops->get("discord-webhook-url") !== "none"){
|
||||||
console("[INFO] Discord Logger is enabled.");
|
console("[INFO] Discord Logger is enabled.");
|
||||||
|
|
@ -213,6 +214,8 @@ class PocketMinecraftServer{
|
||||||
* @param string $reason
|
* @param string $reason
|
||||||
*/
|
*/
|
||||||
public function close($reason = "server stop"){
|
public function close($reason = "server stop"){
|
||||||
|
$this->send2Discord('[INFO] Server stopped!');
|
||||||
|
usleep(2);
|
||||||
if($this->stop !== true){
|
if($this->stop !== true){
|
||||||
if(is_int($reason)){
|
if(is_int($reason)){
|
||||||
$reason = "signal stop";
|
$reason = "signal stop";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue