From 3c8059dbf962295665ff5f78af6d5bc8d796c99b Mon Sep 17 00:00:00 2001 From: 56738 Date: Fri, 4 Oct 2024 11:06:42 +0200 Subject: [PATCH] Allow dropping tool if no entity is selected --- .../me/m56738/easyarmorstands/session/SessionListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easyarmorstands-plugin/src/main/java/me/m56738/easyarmorstands/session/SessionListener.java b/easyarmorstands-plugin/src/main/java/me/m56738/easyarmorstands/session/SessionListener.java index 4277598a..d0f2aed0 100644 --- a/easyarmorstands-plugin/src/main/java/me/m56738/easyarmorstands/session/SessionListener.java +++ b/easyarmorstands-plugin/src/main/java/me/m56738/easyarmorstands/session/SessionListener.java @@ -249,10 +249,10 @@ public void onDrop(PlayerDropItemEvent event) { SessionImpl session = manager.getSession(player); if (session != null) { ElementSelectionNode node = session.findNode(ElementSelectionNode.class); - if (node != null) { + if (node != null && node != session.getNode()) { session.returnToNode(node); + event.setCancelled(true); } - event.setCancelled(true); } }