Adds tab completion to the books without borders command
This commit is contained in:
parent
e167f93de0
commit
db3af1542b
@ -4,11 +4,14 @@ import net.knarcraft.bookswithoutborders.BooksWithoutBorders;
|
|||||||
import net.knarcraft.bookswithoutborders.utility.EconomyHelper;
|
import net.knarcraft.bookswithoutborders.utility.EconomyHelper;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.PluginCommand;
|
import org.bukkit.command.PluginCommand;
|
||||||
|
import org.bukkit.command.TabExecutor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static net.knarcraft.bookswithoutborders.BooksWithoutBorders.sendErrorMessage;
|
import static net.knarcraft.bookswithoutborders.BooksWithoutBorders.sendErrorMessage;
|
||||||
import static net.knarcraft.bookswithoutborders.BooksWithoutBordersSettings.getCommandColor;
|
import static net.knarcraft.bookswithoutborders.BooksWithoutBordersSettings.getCommandColor;
|
||||||
import static net.knarcraft.bookswithoutborders.BooksWithoutBordersSettings.getSuccessColor;
|
import static net.knarcraft.bookswithoutborders.BooksWithoutBordersSettings.getSuccessColor;
|
||||||
@ -16,7 +19,7 @@ import static net.knarcraft.bookswithoutborders.BooksWithoutBordersSettings.getS
|
|||||||
/**
|
/**
|
||||||
* Command executor for the books without borders (bwb) command
|
* Command executor for the books without borders (bwb) command
|
||||||
*/
|
*/
|
||||||
public class CommandBooksWithoutBorders implements CommandExecutor {
|
public class CommandBooksWithoutBorders implements TabExecutor {
|
||||||
|
|
||||||
private final BooksWithoutBorders booksWithoutBorders = BooksWithoutBorders.getInstance();
|
private final BooksWithoutBorders booksWithoutBorders = BooksWithoutBorders.getInstance();
|
||||||
|
|
||||||
@ -103,4 +106,8 @@ public class CommandBooksWithoutBorders implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user