mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-18 10:32:30 +00:00
Add Gaea version information to /te version
This commit is contained in:
parent
ea98093a8d
commit
d147097df6
@ -1,12 +1,15 @@
|
|||||||
package com.dfsek.terra.command;
|
package com.dfsek.terra.command;
|
||||||
|
|
||||||
import com.dfsek.terra.config.lang.LangUtil;
|
import com.dfsek.terra.config.lang.LangUtil;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.polydev.gaea.command.Command;
|
import org.polydev.gaea.command.Command;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class VersionCommand extends Command {
|
public class VersionCommand extends Command {
|
||||||
public VersionCommand(Command parent) {
|
public VersionCommand(Command parent) {
|
||||||
@ -25,7 +28,12 @@ public class VersionCommand extends Command {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
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());
|
Plugin gaea = Objects.requireNonNull(Bukkit.getPluginManager().getPlugin("Gaea"));
|
||||||
|
String gaeaVersion = gaea.getDescription().getVersion();
|
||||||
|
|
||||||
|
String terraVersion = getMain().getDescription().getVersion();
|
||||||
|
LangUtil.send("command.version", sender, terraVersion, gaeaVersion);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ command:
|
|||||||
players-only: "Command is for players only."
|
players-only: "Command is for players only."
|
||||||
world: "This command must be executed in a Terra world!"
|
world: "This command must be executed in a Terra world!"
|
||||||
reload: "Reloaded Terra config."
|
reload: "Reloaded Terra config."
|
||||||
version: "This server is running Terra version \"%s\""
|
version: "This server is running Terra version \"%1$s\", implementing Gaea version \"%2$s\""
|
||||||
main-menu:
|
main-menu:
|
||||||
- "--------------------Terra--------------------"
|
- "--------------------Terra--------------------"
|
||||||
- "reload - Reload configuration data"
|
- "reload - Reload configuration data"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: "Terra"
|
name: "Terra"
|
||||||
depend: [ "Gaea" ]
|
depend: [ "Gaea" ]
|
||||||
main: "com.dfsek.terra.Terra"
|
main: "com.dfsek.terra.Terra"
|
||||||
version: "1.1.1-BETA"
|
version: "1.2.0-BETA"
|
||||||
load: "STARTUP"
|
load: "STARTUP"
|
||||||
api-version: "1.16"
|
api-version: "1.16"
|
||||||
softdepend: [ "WorldEdit" ]
|
softdepend: [ "WorldEdit" ]
|
||||||
|
@ -1 +1 @@
|
|||||||
config: DEFAULT
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user