gekware / minecraft-server-hibernation

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

Phats on Windows not work #128

Closed johnbli closed 2 years ago

johnbli commented 2 years ago

Phats on Windows not work

my server is in D:/t/ the script not will run

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

D:\t>

gekigek99 commented 2 years ago

What terminal are you using? cmd, powershell...?

main: LoadConfig: checkConfigRuntime: specified server file/folder does not exist: Just to be sure I remind you that on windows you have to specify the folder in this way D:\\path\\to\\server\\folder (with double back slashes)

johnbli commented 2 years ago

cmd the script start not the server

johnbli commented 2 years ago

╔═════════════════════════════════════════════╗ ║ _| | ║ ║ | ' ` \/ | '_ \ ║ ║ | | | | | \ \ | | | ║ ║ || || |_|__/| |_| v2.4.4 ║ ║ Copyright (C) 2019-2021 gekigek99 ║ ║ github: https://github.com/gekigek99 ║ ║ remember to give a star to this repository! ║ ╚═════════════════════════════════════════════╝ 2022/01/26 12:47:28 [←[0;34minfo←[0m ] checking OS support... 2022/01/26 12:47:28 [←[0;34minfo←[0m ] loading config default... 2022/01/26 12:47:28 [←[0;34minfo←[0m * ] loading config runtime... 2022/01/26 12:47:28 [←[0;34minfo←[0m ] ←[0;36mlog level set to: 1←[0m 2022/01/26 12:47:28 [←[0;34minfo←[0m ] ←0m *** is running an unofficial release←[0m msh start 2022/01/26 12:47:40 [←[0;34minfo←[0m ] MINECRAFT SERVER IS STARTING! 2022/01/26 12:47:41 [←[0;34minfo←[0m ] MINECRAFT SERVER IS OFFLINE!

gekigek99 commented 2 years ago

ok the graphical part is a problem that is caused by the terminal but should not affect the functionality of msh.

the server not starting is an other problem... can you send me the msh-config.json content?

johnbli commented 2 years ago
{
  "Server": {
    "Folder": "D:\\MCTest",
    "FileName": "forge-1.12.2-14.23.5.2860.jar",
    "Protocol": 756,
    "Version": "1.17.1"
  },
  "Commands": {
  "StartServer": "C:\\Program Files\\Java\\jre1.8.0_311\\bin\\java.exe <Commands.StartServerParam> -jar <Server.FileName> nogui",
    "StartServerParam": "-Xmx1024M -Xms8024M",
    "StopServer": "stop",
    "StopServerAllowKill": 10
  },
  "Msh": {
    "Debug": 1,
    "InfoHibernation": "                   §fserver status:\n                   §b§lHIBERNATING",
    "InfoStarting": "                   §fserver status:\n                    §6§lWARMING UP",
    "NotifyUpdate": true,
    "ListenPort": 25555,
    "TimeBeforeStoppingEmptyServer": 30
  }
}
johnbli commented 2 years ago
╔═════════════════════════════════════════════╗
║  _ __ ___  ___| |__                         ║
║ | '_ ` _ \/ __| '_ \                        ║
║ | | | | | \__ \ | | |                       ║
║ |_| |_| |_|___/_| |_| v2.4.4                ║
║ Copyright (C) 2019-2021 gekigek99           ║
║ github: https://github.com/gekigek99        ║
║ remember to give a star to this repository! ║
╚═════════════════════════════════════════════╝
2022/01/26 13:18:41 [←[0;34minfo←[0m  *   ] checking OS support...
2022/01/26 13:18:41 [←[0;34minfo←[0m  *   ] loading config default...
2022/01/26 13:18:41 [←[0;34minfo←[0m  *   ] loading config runtime...
2022/01/26 13:18:41 [←[0;34minfo←[0m  ****] ←[0;36mlog level set to: 1←[0m
2022/01/26 13:18:42 [←[0;34minfo←[0m  ****] ←[0;36mmsh (v2.4.4) is running an unofficial release←[0m
msh start

i become no feedback

johnbli commented 2 years ago

we i can set the java version in the config file i have jdk java 17 and java 8 for forge server

gekigek99 commented 2 years ago

"StartServer": "C:\\Program Files\\Java\\jre1.8.0_311\\bin\\java.exe <Commands.StartServerParam> -jar <Server.FileName> nogui",

in this line java should be invoked without any spaces (the space in Program Files)

you can: