vincss / mcsleepingserverstarter

Put your minecraft server to rest, while SleepingServerStarter is watching !
https://www.spigotmc.org/threads/put-your-server-to-rest-with-sleepingserverstarter.108828/
249 stars 47 forks source link

When I type "npm start" in command prompt, it wipes my config data. #242

Open ctadros1 opened 6 months ago

ctadros1 commented 6 months ago

Here is a log of what is says. I put stars around the stuff of interest.

2024-03-24 16:01:39 info: ................................
2024-03-24 16:01:39 info: ... A new story begin v1.9.1 ...
2024-03-24 16:01:39 info: ................................
2024-03-24 16:01:39 error: **Failed to load setting, using default. unknown escape sequence (8:37)**

 5 | loginMessage: Waking server up. Process takes 3 mins.
 6 | serverOnlineMode: true
 7 | startMinecraft: true
 8 | minecraftCommand: "C:\Program Files\Java\jre-1.8\bin\java" -server - ...
-----------------------------------------^
 9 | restartDelay: 5000
 10 | version: true
2024-03-24 16:01:39 info: **Backing up your old config to : sleepingSettings.yml.2024-03-24T200139.353Z.bak**
2024-03-24 16:01:39 info: **Saving default settings to sleepingSettings.yml**
2024-03-24 16:01:39 info: Retrieved settings:{"serverName":"SleepingServer, waiting for his prince...","serverPort":25565,"maxPlayers":20,"loginMessage":"...Waking server up, come back in a minute...","serverOnlineMode":true,"startMinecraft":true,"minecraftCommand":"java -jar paper.jar nogui","restartDelay":5000,"version":false,"useWhitelistFile":false,"useBlacklistFiles":false,"useNativeFiles":false}
2024-03-24 16:01:39 info: Retrieving whitelist entries from C:\SkyFactory 4 Server\whitelist.json
2024-03-24 16:01:39 info: Retrieved whitelist entries:[]
2024-03-24 16:01:39 info: Retrieving banned ips from C:\SkyFactory 4 Server\banned-ips.json
2024-03-24 16:01:39 info: Retrieved banned ips:[]
2024-03-24 16:01:39 info: Retrieving banned players from C:\SkyFactory 4 Server\banned-players.json
2024-03-24 16:01:39 info: Retrieved banned players:[]
2024-03-24 16:01:39 info: [Main] Waiting for 'quit' in CLI.
2024-03-24 16:01:39 info: [McJava] Waiting for a Prince to come. [25565]
2024-03-24 16:01:39 error: Something went wrong in wonderland listen EADDRINUSE: address already in use :::25565

Bellow is my sleepingSettings.yml file before it wipes it:

serverName: Server is sleeping. Join to wake up.
serverVersion: 1.12.2
serverPort: 25545
maxPlayers: 20
loginMessage: Waking server up. Process takes 3 mins.
serverOnlineMode: true
startMinecraft: true
minecraftCommand: "C:\Program Files\Java\jre-1.8\bin\java" -server -Xms1G -Xmx16G -jar forge-1.12.2-14.23.5.2860.jar nogui
restartDelay: 5000
version: false (I tried it on "true" but result was the same)
useWhitelistFile: false
useBlacklistFiles: false
useNativeFiles: false (I tried it on "true" but result was the same)

Keep in mind, I had to type in a file path instead of the start command because I am hosting a Sky Factory 4 server (Forge 1.12.2 on Java 8) along with 2 other servers (Forge 1.19.2 on Java 17). I did some trouble shooting for like 3 hours and I found that this was the only way to launch this server in Java 8 and the other servers in Java 17.

vincss commented 6 months ago

Hi, Yes there is an issue while parsing strings with " in the yaml parser library, you can make a workaround by putting it in a .bat file.