
First Light
When running a server on a personal computer, many users encounter an unpleasant situation: sudden crashes can roll back progress by several hours. Players inevitably get upset when discovering their lost achievements. Unfortunately, during prolonged operation without restarts, the server can indeed fail.
This plugin elegantly solves this problem - it automatically shuts down the server when the last remaining player leaves the game. At the same time, in-game time is reset to dawn (0 ticks) so that the next connecting players start their day in the morning.
Main Features
- Automated server shutdown
- Time set to dawn
Note that the plugin will frequently shut down the server, so it's worth configuring automatic restart via a loop script.
Configuration for Windows
@echo off
:x
cls
ping 127.0.0.1 > nul
java -Xmx3G -d64 -jar spigot.jar nogui
goto x
Configuration for Linux
#!/bin/bash
while :
do
clear
sleep 5
java -Xmx3G -d64 -jar spigot.jar nogui
done
Required Components
For Windows
We recommend using scoop package manager to install dependencies.
scoop bucket add extras
scoop bucket add java
scoop install maven openjdk vscode
For Linux
sudo snap install vscode
sudo apt install default-jdk maven
Project Build
Open the project in VSCode and execute the following commands.
mvn eclipse:eclipse
mvn package