From 50e45f07f096539c9754e2295d6f632f9654a1b2 Mon Sep 17 00:00:00 2001 From: Jeff P Date: Wed, 2 Aug 2023 08:08:58 -0400 Subject: [PATCH] fix: Do not tab complete if command not owned by FAWE (#2386) --- .../java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java index f1edf65f7..e881416c5 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java @@ -672,6 +672,13 @@ public class WorldEditPlugin extends JavaPlugin { String label = buffer.substring(0, firstSpace); // Strip leading slash, if present. label = label.startsWith("/") ? label.substring(1) : label; + + // If command not owned by FAWE, do not tab complete + Plugin owner = platform.getDynamicCommands().getCommandOwner(label); + if (owner != WorldEditPlugin.this) { + return; + } + final Optional command = WorldEdit.getInstance().getPlatformManager().getPlatformCommandManager().getCommandManager().getCommand( label);