mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Implement suggestions for Bukkit + Sponge
This commit is contained in:
committed by
Kenzie Togami
parent
1c54a04fd1
commit
8a3e6a12b9
@ -37,6 +37,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||
import com.sk89q.worldedit.internal.command.CommandUtil;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
import com.sk89q.worldedit.world.block.BlockCategory;
|
||||
@ -313,9 +314,10 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
|
||||
System.arraycopy(args, 0, split, 1, args.length);
|
||||
split[0] = "/" + cmd.getName();
|
||||
|
||||
CommandSuggestionEvent event = new CommandSuggestionEvent(wrapCommandSender(sender), Joiner.on(" ").join(split));
|
||||
String arguments = Joiner.on(" ").join(split);
|
||||
CommandSuggestionEvent event = new CommandSuggestionEvent(wrapCommandSender(sender), arguments);
|
||||
getWorldEdit().getEventBus().post(event);
|
||||
return event.getSuggestions();
|
||||
return CommandUtil.fixSuggestions(arguments, event.getSuggestions());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user