From 19ed0162e5ba017d3f71419e70386fd33f0e4079 Mon Sep 17 00:00:00 2001 From: Intelli Date: Tue, 4 Jan 2022 19:19:08 -0700 Subject: [PATCH] Fixed MySQL purges not being gracefully interrupted on shutdown --- src/main/java/net/coreprotect/command/PurgeCommand.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/coreprotect/command/PurgeCommand.java b/src/main/java/net/coreprotect/command/PurgeCommand.java index abe36cf..002f69e 100755 --- a/src/main/java/net/coreprotect/command/PurgeCommand.java +++ b/src/main/java/net/coreprotect/command/PurgeCommand.java @@ -329,6 +329,11 @@ public class PurgeCommand extends Consumer { } } catch (Exception e) { + if (!ConfigHandler.serverRunning) { + Chat.sendGlobalMessage(player, Phrase.build(Phrase.PURGE_FAILED)); + return; + } + e.printStackTrace(); } }