diff --git a/resources/lang/de.yml b/resources/lang/de.yml
index 2cb2af5..15b9cb5 100644
--- a/resources/lang/de.yml
+++ b/resources/lang/de.yml
@@ -58,6 +58,7 @@ Language:
Backup: "Erstellt eine Sicherungskopie eines Rucksackes."
Restore: "Stellt eine Sicherungskopie eines Rucksackes wieder her."
RestoreList: "Listet alle verfügbaren Sicherungskopien von Rucksäcken auf."
+ Version: "Gibt die Versionsdetails über das Plugin und seine Abhängigkeiten aus."
Help: "Zeigt die verfügbaren Befehle an."
Command:
@@ -85,6 +86,8 @@ Command:
- restore
ListBackups:
- listbackups
+ Version:
+ - version
Help:
- help
- hilfe
diff --git a/resources/lang/en.yml b/resources/lang/en.yml
index c781fe2..fc8878f 100644
--- a/resources/lang/en.yml
+++ b/resources/lang/en.yml
@@ -56,6 +56,7 @@ Language:
OpenOthers: "Shows the backpack of another player."
Reload: "Reloads the config of the plugin."
Update: "Checks for new plugin updates."
+ Version: "Prints the version details about the plugin and it's dependencies."
Backup: "Creates a backup of a players backpack."
Restore: "Restores a backup."
RestoreList: "Lists all available backups."
@@ -82,6 +83,8 @@ Command:
- restore
ListBackups:
- listbackups
+ Version:
+ - version
Help:
- help
diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java
index 9b6139c..5c1a727 100644
--- a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java
+++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/CommandManager.java
@@ -76,6 +76,7 @@ public CommandManager(Minepacks plugin)
registerSubCommand(new BackupCommand(plugin));
registerSubCommand(new RestoreCommand(plugin));
registerSubCommand(new MigrateCommand(plugin));
+ registerSubCommand(new VersionCommand(plugin));
registerSubCommand(new HelpCommand(plugin, commands));
}
diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/VersionCommand.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/VersionCommand.java
new file mode 100644
index 0000000..8e0596d
--- /dev/null
+++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/Command/VersionCommand.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019 GeorgH93
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package at.pcgamingfreaks.Minepacks.Bukkit.Command;
+
+import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand;
+import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks;
+import at.pcgamingfreaks.PluginLib.Bukkit.PluginLib;
+
+import org.bukkit.command.CommandSender;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+
+public class VersionCommand extends MinepacksCommand
+{
+ public VersionCommand(Minepacks plugin)
+ {
+ super(plugin, "version", plugin.getLanguage().getTranslated("Commands.Description.Version"), "backpack.version", plugin.getLanguage().getCommandAliases("Version"));
+ }
+
+ @Override
+ public void execute(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String[] args)
+ {
+ sender.sendMessage("##### Start Minepacks version info #####");
+ sender.sendMessage("Marriage Master: " + plugin.getDescription().getVersion());
+ sender.sendMessage("PCGF PluginLib: " + PluginLib.getInstance().getVersion());
+ sender.sendMessage("Server: " + plugin.getServer().getVersion());
+ sender.sendMessage("##### End Minepacks version info #####");
+ }
+
+ @Override
+ public List tabComplete(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String[] args)
+ {
+ return null;
+ }
+}
\ No newline at end of file