Add version command, add more languages, update README.md

This commit is contained in:
dfsek
2020-10-25 03:02:05 -07:00
parent c536c5f060
commit 31d3b5ff8d
7 changed files with 210 additions and 5 deletions

View File

@@ -24,7 +24,8 @@ public class TerraCommand extends Command {
new StructureCommand(this),
new ImageCommand(this),
new GeometryCommand(this),
new FixChunkCommand(this));
new FixChunkCommand(this),
new VersionCommand(this));
public TerraCommand(GaeaPlugin main) {
super(main);

View File

@@ -0,0 +1,41 @@
package com.dfsek.terra.command;
import com.dfsek.terra.config.lang.LangUtil;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.polydev.gaea.command.Command;
import java.util.Collections;
import java.util.List;
public class VersionCommand extends Command {
public VersionCommand(Command parent) {
super(parent);
}
@Override
public String getName() {
return "version";
}
@Override
public List<Command> getSubCommands() {
return Collections.emptyList();
}
@Override
public boolean execute(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
LangUtil.send("command.version", sender, getMain().getDescription().getVersion());
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();
}
}