mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Add "disable" to tab complete
This commit is contained in:
parent
4444fc6ec2
commit
c18ce123c0
@ -10,6 +10,7 @@ import java.util.Locale;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import io.github.thebusybiscuit.slimefun4.core.commands.subcommands.DebugCommand;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.TabCompleter;
|
import org.bukkit.command.TabCompleter;
|
||||||
@ -33,6 +34,8 @@ class SlimefunTabCompleter implements TabCompleter {
|
|||||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
if (args.length == 1) {
|
if (args.length == 1) {
|
||||||
return createReturnList(command.getSubCommandNames(), args[0]);
|
return createReturnList(command.getSubCommandNames(), args[0]);
|
||||||
|
} else if (args.length == 2) {
|
||||||
|
return createReturnList(DebugCommand.tabCompletions, args[1]);
|
||||||
} else if (args.length == 3) {
|
} else if (args.length == 3) {
|
||||||
if (args[0].equalsIgnoreCase("give")) {
|
if (args[0].equalsIgnoreCase("give")) {
|
||||||
return createReturnList(getSlimefunItems(), args[2]);
|
return createReturnList(getSlimefunItems(), args[2]);
|
||||||
|
@ -7,6 +7,8 @@ import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
|
|||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The debug command will allow server owners to get information for us developers.
|
* The debug command will allow server owners to get information for us developers.
|
||||||
@ -16,6 +18,8 @@ import javax.annotation.Nonnull;
|
|||||||
*/
|
*/
|
||||||
public class DebugCommand extends SubCommand {
|
public class DebugCommand extends SubCommand {
|
||||||
|
|
||||||
|
public static final List<String> tabCompletions = Collections.singletonList("disable");
|
||||||
|
|
||||||
protected DebugCommand(@Nonnull Slimefun plugin, @Nonnull SlimefunCommand cmd) {
|
protected DebugCommand(@Nonnull Slimefun plugin, @Nonnull SlimefunCommand cmd) {
|
||||||
super(plugin, cmd, "debug", true);
|
super(plugin, cmd, "debug", true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user