From d61b2205c0f7eb0d2762e0462452aedb340b0b96 Mon Sep 17 00:00:00 2001 From: Julian Krings Date: Wed, 18 Jun 2025 11:25:41 +0200 Subject: [PATCH] handle failing restart command better --- .../main/java/com/volmit/iris/core/ServerConfigurator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/volmit/iris/core/ServerConfigurator.java b/core/src/main/java/com/volmit/iris/core/ServerConfigurator.java index b3709e43f..a84d22ef6 100644 --- a/core/src/main/java/com/volmit/iris/core/ServerConfigurator.java +++ b/core/src/main/java/com/volmit/iris/core/ServerConfigurator.java @@ -172,11 +172,14 @@ public class ServerConfigurator { Iris.warn("New data pack entries have been installed in Iris! Restarting server!"); Iris.warn("This will only happen when your pack changes (updates/first time setup)"); Iris.warn("(You can disable this auto restart in iris settings)"); + if (!Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "restart")) { + Iris.warn("Looks like the restart command didn't work. Stopping the server instead!"); + Bukkit.shutdown(); + } J.s(() -> { Iris.warn("Looks like the restart command didn't work. Stopping the server instead!"); Bukkit.shutdown(); }, 100); - Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "restart"); }); }