Move files from Scripts/ to src/ and add 'on' to start server. #144

Merged
Sirherobrine23 merged 8 commits from Changes-and-move-Scripts-dir into main 2021-08-02 22:33:21 +00:00
Showing only changes of commit bf1e1ead1f - Show all commits

View File

@ -120,9 +120,8 @@ function start() {
// Post Start
if (GetPlatform() === "java") {
ServerExec.stdout.on("data", function(data){
if (data.includes("agree") && data.includes("EULA"))
const eula_file = path.join(GetServerPaths("java"), "eula.txt");
fs.writeFileSync(eula_file, fs.readFileSync(eula_file, "utf8").split("eula=false").join("eula=true"));
if (data.includes("agree") && data.includes("EULA")) fs.writeFileSync(eula_file, fs.readFileSync(eula_file, "utf8").split("eula=false").join("eula=true"));
throw new Error("Restart application/CLI")
});
}