adds forge support, fixes some critical errors
This commit is contained in:
36
serverConfigs/start.ts
Normal file
36
serverConfigs/start.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Loader } from "../types/mcgrizzconf.ts";
|
||||
|
||||
export const getServerStartCommands = (
|
||||
loader: Loader,
|
||||
instance = "server",
|
||||
): Deno.Command => {
|
||||
switch (loader) {
|
||||
case "forge":
|
||||
return new Deno.Command(
|
||||
Deno.build.os === "windows" ? "./run.bat" : "./run.sh",
|
||||
// "pwd",
|
||||
{
|
||||
args: [
|
||||
"nogui",
|
||||
],
|
||||
stdin: "piped",
|
||||
stdout: "piped",
|
||||
cwd: "./" + instance,
|
||||
},
|
||||
);
|
||||
case "vanilla":
|
||||
case "unset":
|
||||
case "fabric":
|
||||
return new Deno.Command("java", {
|
||||
args: [
|
||||
"-Xmx8G",
|
||||
"-jar",
|
||||
"./server.jar",
|
||||
"nogui",
|
||||
],
|
||||
cwd: "./" + instance,
|
||||
stdin: "piped",
|
||||
stdout: "piped",
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user