Terra/src/main/java/com/dfsek/terra/command/TerraCommand.java
2020-10-07 02:46:44 -07:00

53 lines
1.6 KiB
Java

package com.dfsek.terra.command;
import com.dfsek.terra.command.biome.BiomeCommand;
import com.dfsek.terra.command.geometry.GeometryCommand;
import com.dfsek.terra.command.image.ImageCommand;
import com.dfsek.terra.command.profile.ProfileCommand;
import com.dfsek.terra.command.structure.StructureCommand;
import com.dfsek.terra.command.type.Command;
import com.dfsek.terra.config.lang.LangUtil;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class TerraCommand extends Command {
private final List<com.dfsek.terra.command.type.Command> commands = Arrays.asList(new ReloadCommand(),
new BiomeCommand(),
new OreCommand(),
new ProfileCommand(),
new SaveDataCommand(),
new StructureCommand(),
new ImageCommand(),
new GeometryCommand());
@Override
public String getName() {
return "terra";
}
@Override
public List<Command> getSubCommands() {
return commands;
}
@Override
public boolean execute(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
LangUtil.send("command.main-menu", sender);
return true;
}
@Override
public int arguments() {
return 0;
}
@Override
public List<String> getTabCompletions(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) {
return Collections.emptyList();
}
}