2019-04-30 18:24:07 +02:00
|
|
|
/*
|
2020-02-07 01:02:15 +01:00
|
|
|
* Copyright (C) 2020 GeorgH93
|
2019-04-30 18:24:07 +02:00
|
|
|
*
|
|
|
|
* 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
|
2023-06-15 20:07:38 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2019-04-30 18:24:07 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package at.pcgamingfreaks.Minepacks.Bukkit.Command;
|
|
|
|
|
|
|
|
import at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksCommand;
|
|
|
|
import at.pcgamingfreaks.Minepacks.Bukkit.Minepacks;
|
2020-02-07 01:02:15 +01:00
|
|
|
import at.pcgamingfreaks.Minepacks.Bukkit.Permissions;
|
2019-04-30 18:24:07 +02:00
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class VersionCommand extends MinepacksCommand
|
|
|
|
{
|
2019-10-04 00:53:41 +02:00
|
|
|
private final String minepacksVersion;
|
|
|
|
|
2019-04-30 18:24:07 +02:00
|
|
|
public VersionCommand(Minepacks plugin)
|
|
|
|
{
|
2020-02-07 01:02:15 +01:00
|
|
|
super(plugin, "version", plugin.getLanguage().getTranslated("Commands.Description.Version"), Permissions.VERSION, plugin.getLanguage().getCommandAliases("Version"));
|
2019-10-04 00:53:41 +02:00
|
|
|
minepacksVersion = plugin.getDescription().getName() + ": " + plugin.getDescription().getVersion();
|
2019-04-30 18:24:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void execute(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String[] args)
|
|
|
|
{
|
|
|
|
sender.sendMessage("##### Start Minepacks version info #####");
|
2019-10-04 00:53:41 +02:00
|
|
|
sender.sendMessage(minepacksVersion);
|
2019-06-01 00:16:24 +02:00
|
|
|
/*if_not[STANDALONE]*/
|
2019-05-31 16:09:22 +02:00
|
|
|
sender.sendMessage("PCGF PluginLib: " + at.pcgamingfreaks.PluginLib.Bukkit.PluginLib.getInstance().getVersion());
|
|
|
|
/*end[STANDALONE]*/
|
2019-04-30 18:24:07 +02:00
|
|
|
sender.sendMessage("Server: " + plugin.getServer().getVersion());
|
2020-03-15 23:20:25 +01:00
|
|
|
sender.sendMessage("Java: " + System.getProperty("java.version"));
|
2019-04-30 18:24:07 +02:00
|
|
|
sender.sendMessage("##### End Minepacks version info #####");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<String> tabComplete(@NotNull CommandSender sender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String[] args)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|