gekware / minecraft-server-hibernation

Autostart and stop minecraft-server when players join/leave
GNU General Public License v3.0
395 stars 38 forks source link

Folder/File does not exist #135

Closed RagTMS closed 2 years ago

RagTMS commented 2 years ago

I feel like I'm doing something silly but I can't get the server to work

This is what the exe says

╔═════════════════════════════════════════════╗
║  _ __ ___  ___| |__                         ║
║ | '_ ` _ \/ __| '_ \                        ║
║ | | | | | \__ \ | | |                       ║
║ |_| |_| |_|___/_| |_| v2.4.4                ║
║ Copyright (C) 2019-2021 gekigek99           ║
║ github: https://github.com/gekigek99        ║
║ remember to give a star to this repository! ║
╚═════════════════════════════════════════════╝
2022/03/10 20:42:20 [←[0;34minfo←[0m  *   ] checking OS support...
2022/03/10 20:42:20 [←[0;34minfo←[0m  *   ] loading config default...
2022/03/10 20:42:20 [←[0;34minfo←[0m  *   ] loading config runtime...
2022/03/10 20:42:20 [←[0;31merror ←[0m*** ] main: LoadConfig: checkConfigRuntime: specified server file/folder does not exist:

and here is my config

{
  "Server": {
    "Folder": "D:/Raghu/Minecraft Extra/Servers/SMP",
    "FileName": "server.jar",
    "Protocol": 756,
    "Version": "1.18.2"
  },
  "Commands": {
    "StartServer": "java -Xmx8G -jar server.jar nogui
PAUSE",
    "StartServerParam": "-Xmx8192M -Xms2048M",
    "StopServer": "stop",
    "StopServerAllowKill": 60
  },
  "Msh": {
    "Debug": 1,
    "InfoHibernation": "                   §fserver status:\n                   §b§lHIBERNATING",
    "InfoStarting": "                   §fserver status:\n                    §6§lWAKING UP",
    "NotifyUpdate": true,
    "ListenPort": 25555,
    "TimeBeforeStoppingEmptyServer": 30
  }
}

I put {} around the Folder and FileName and switched the / to \ but it says the same thing. The server is fabric 1.18.2.

Thank you

gekigek99 commented 2 years ago

On windows, the folder should be written in this way:

"Folder": "D://Raghu//Minecraft Extra//Servers//SMP"

If after this change the problem is still there, it might be solved by lauching msh like this:

cd "D:/Raghu/Minecraft Extra/Servers/SMP"
./msh.exe

Tell me if this solves your problem, if not we can dig a bit further down to solve it.

If you like this project you can support it by starring it or joining the discord channel

RagTMS commented 2 years ago

Hi, I changed the config to "Folder": "D://Raghu//Minecraft Extra//Servers//SMP" but it still says the same message and when I try to do the

cd "D:/Raghu/Minecraft Extra/Servers/SMP"
./msh.exe

it says this

D:\Raghu\Minecraft Extra\Servers\SMP\minecraft-server-hibernation>./msh.exe
'.' is not recognized as an internal or external command, operable program or batch file.

Can you send a link to your discord channel so I can join it please,

Thank you

gekigek99 commented 2 years ago

discord server

it says this

D:\Raghu\Minecraft Extra\Servers\SMP\minecraft-server-hibernation>./msh.exe
'.' is not recognized as an internal or external command, operable program or batch file.

ok maybe try

cd "D:/Raghu/Minecraft Extra/Servers/SMP"
msh.exe

if it doesnt work: i think i fixed this in 8d85e478e7949599f507330c0db47a9d724f6e27 here is the compiled binary of this commit