From 806ea14ad22b529646eba1e2f210dbf8e392b00b Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 10 Nov 2021 22:13:44 +0000 Subject: [PATCH] Unfix #826 in favour of allowing toggling the wand - #826 is a pretty niche requirement, usually permissions do not change without a world change, relog, etc. very frequently - Allowing //toggleeditwand and /tool none on the wand feels more important --- .../src/main/java/com/sk89q/worldedit/LocalSession.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java index e4ef0fa94..55a899bab 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java @@ -1109,14 +1109,7 @@ public class LocalSession implements TextureHolder { loadDefaults(player, true); // Permissions have changed so redo the player's current tools. return null; } - if (tool != null) { - return tool; - } else if (item.getInternalId() == wandItem.getInternalId() && SelectionWand.INSTANCE.canUse(player)) { - loadDefaults(player, true); // Permissions have changed so redo the player's current tools. - return SelectionWand.INSTANCE; - } else { - return null; - } + return tool; //FAWE end }