From 332f52c98b92e18b0a8d64c05203385b0e010b57 Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Tue, 2 May 2023 23:15:51 +0200 Subject: [PATCH] Fixed position of setLevel(0) call --- SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java b/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java index 72449a6..e522e97 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java @@ -72,7 +72,6 @@ public class SWAnvilInv { } public void addCloseCallback(Runnable callback) { - player.setLevel(0); builder.onClose(p -> callback.run()); } @@ -85,6 +84,7 @@ public class SWAnvilInv { if(s.startsWith("ยป")) s = s.substring(1); callback.accept(s); + player.setLevel(0); return Collections.singletonList(AnvilGUI.ResponseAction.close()); } }