From 66ee4c424350cbe1afce9242db3f5cdb523a8730 Mon Sep 17 00:00:00 2001 From: D4rkr34lm Date: Tue, 2 May 2023 21:37:10 +0200 Subject: [PATCH] Fixed issue with anvil menu under bedrock - Added: player level is set to 1 on opening anvil menu - Added: player level is set to 0 on anvil menu close --- SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java b/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java index bd92d53..72449a6 100644 --- a/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java +++ b/SpigotCore_Main/src/de/steamwar/inventory/SWAnvilInv.java @@ -72,10 +72,12 @@ public class SWAnvilInv { } public void addCloseCallback(Runnable callback) { + player.setLevel(0); builder.onClose(p -> callback.run()); } public void open() { + player.setLevel(1); builder.open(player); }