From 054d039739f08bf0fc00d703c47dfb6172a60186 Mon Sep 17 00:00:00 2001 From: 0x7d8 Date: Tue, 23 Apr 2024 22:22:31 +0200 Subject: [PATCH] code adjustments --- .github/workflows/build.yml | 1 - .../dev/mcvapi/neoforgeserverjar/NeoForgeServerJAR.java | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d0817b..622a361 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,4 +43,3 @@ jobs: tag_name: ${{ steps.get-version-id.outputs.id }} draft: false prerelease: false - permissions: write diff --git a/src/main/java/dev/mcvapi/neoforgeserverjar/NeoForgeServerJAR.java b/src/main/java/dev/mcvapi/neoforgeserverjar/NeoForgeServerJAR.java index f5cfc27..0bf7b08 100644 --- a/src/main/java/dev/mcvapi/neoforgeserverjar/NeoForgeServerJAR.java +++ b/src/main/java/dev/mcvapi/neoforgeserverjar/NeoForgeServerJAR.java @@ -3,7 +3,7 @@ import dev.mcvapi.neoforgeserverjar.server.ServerBootstrap; import dev.mcvapi.neoforgeserverjar.utils.ErrorReporter; -import java.io.*; +import java.io.File; import java.lang.management.ManagementFactory; public class NeoForgeServerJAR { @@ -28,7 +28,6 @@ public static void main(final String[] args) { ErrorReporter.error("09", true); } - // Server startup String[] vmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments().toArray(new String[0]); String[] cmd = new String[vmArgs.length + 2]; cmd[0] = "java"; @@ -36,7 +35,8 @@ public static void main(final String[] args) { System.arraycopy(vmArgs, 0, cmd, 1, vmArgs.length); boolean windows = System.getProperty("os.name").startsWith("Windows"); - cmd[1 + vmArgs.length] = "@libraries/net/neoforged/neoforge/" + forgeVersion + "/" + (windows ? "win" : "unix") + "_args.txt"; + cmd[1 + vmArgs.length] = "@libraries/net/neoforged/neoforge/" + forgeVersion + "/" + (windows ? "win" : "unix") + + "_args.txt"; try { new ServerBootstrap().startServer(cmd);