Adds tab completion for the set lore command
This commit is contained in:
parent
58c8f76984
commit
e167f93de0
@ -5,8 +5,8 @@ import net.knarcraft.bookswithoutborders.utility.InventoryHelper;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
@ -18,7 +18,7 @@ import java.util.List;
|
||||
/**
|
||||
* Command executor for the set lore command
|
||||
*/
|
||||
public class CommandSetLore implements CommandExecutor {
|
||||
public class CommandSetLore implements TabExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
@ -58,4 +58,11 @@ public class CommandSetLore implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
|
||||
//TODO: Figure out if there is a better way to display that an argument is required
|
||||
List<String> options = new ArrayList<>();
|
||||
options.add("<new lore>");
|
||||
return options;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user