mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Refactor confirmation
This commit is contained in:
@ -341,19 +341,19 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||
// Add the command to the array because the underlying command handling
|
||||
// code of WorldEdit expects it
|
||||
String[] split = new String[args.length + 1];
|
||||
System.arraycopy(args, 0, split, 1, args.length);
|
||||
split[0] = commandLabel;
|
||||
|
||||
String arguments = Joiner.on(" ").join(split);
|
||||
CommandSuggestionEvent event = new CommandSuggestionEvent(wrapCommandSender(sender), arguments);
|
||||
getWorldEdit().getEventBus().post(event);
|
||||
return CommandUtil.fixSuggestions(arguments, event.getSuggestions());
|
||||
}
|
||||
// @Override
|
||||
// public List<String> onTabComplete(CommandSender sender, Command cmd, String commandLabel, String[] args) {
|
||||
// // Add the command to the array because the underlying command handling
|
||||
// // code of WorldEdit expects it
|
||||
// String[] split = new String[args.length + 1];
|
||||
// System.arraycopy(args, 0, split, 1, args.length);
|
||||
// split[0] = commandLabel;
|
||||
//
|
||||
// String arguments = Joiner.on(" ").join(split);
|
||||
// CommandSuggestionEvent event = new CommandSuggestionEvent(wrapCommandSender(sender), arguments);
|
||||
// getWorldEdit().getEventBus().post(event);
|
||||
// return CommandUtil.fixSuggestions(arguments, event.getSuggestions());
|
||||
// }
|
||||
|
||||
private void fail(Runnable run, String message) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user