mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: Do not tab complete if command not owned by FAWE (#2386)
This commit is contained in:
parent
a6f1c6ac82
commit
50e45f07f0
@ -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<org.enginehub.piston.Command> command
|
||||
= WorldEdit.getInstance().getPlatformManager().getPlatformCommandManager().getCommandManager().getCommand(
|
||||
label);
|
||||
|
Loading…
Reference in New Issue
Block a user