mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Merge branch 'test' of https://github.com/GameHerobrine/NostalgiaCore into test
This commit is contained in:
commit
f5160df26f
2 changed files with 5 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ class LevelAPI{
|
||||||
$this->server->saveEnabled = true;
|
$this->server->saveEnabled = true;
|
||||||
$this->saveAll();
|
$this->saveAll();
|
||||||
$this->server->saveEnabled = $save;
|
$this->server->saveEnabled = $save;
|
||||||
|
$this->server->api->chat->broadcast("[NostalgiaCore] All data is saved.");
|
||||||
break;
|
break;
|
||||||
case "save-on":
|
case "save-on":
|
||||||
$this->server->saveEnabled = true;
|
$this->server->saveEnabled = true;
|
||||||
|
|
|
||||||
|
|
@ -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