From 655086fc564a379d0819e5f9d7d94572aebe66a8 Mon Sep 17 00:00:00 2001 From: Alex 'mcmonkey' Goodwin Date: Mon, 30 Aug 2021 13:44:45 -0700 Subject: [PATCH] extra hard workaround for Paper being bad --- .../denizen/events/player/PlayerQuitsScriptEvent.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerQuitsScriptEvent.java b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerQuitsScriptEvent.java index b91b72d6ed..efeb20be69 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerQuitsScriptEvent.java +++ b/plugin/src/main/java/com/denizenscript/denizen/events/player/PlayerQuitsScriptEvent.java @@ -87,6 +87,8 @@ public void onPlayerQuits(PlayerQuitEvent event) { return; } if (!event.getPlayer().isOnline()) { // Workaround: Paper misfires this event extra times after the player is already gone. + event.setQuitMessage(null); // Block the message too since it's obviously not valid for the message to show a second time. + // Also note that Paper literally has a commit that just removes a warning that would have helped catch issues like this because I guess they just like having errors https://i.alexgoodwin.media/i/misc/a8f5c3.png return; } this.event = event;