mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 17:26:07 +00:00
Add version command, add more languages, update README.md
This commit is contained in:
@@ -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);
|
||||
|
||||
41
src/main/java/com/dfsek/terra/command/VersionCommand.java
Normal file
41
src/main/java/com/dfsek/terra/command/VersionCommand.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user