Added /bsadmin version - WIP

will contains data about the addons, Bskyblock and Bukkit's version, etc.
This commit is contained in:
Florian CUNY 2017-12-10 21:43:05 +01:00
parent d776f6a90b
commit f133dfe581
2 changed files with 29 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package us.tastybento.bskyblock.commands;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.api.commands.CompositeCommand;
import us.tastybento.bskyblock.commands.admin.AdminVersionCommand;
import us.tastybento.bskyblock.config.Settings;
public class AdminCommand extends CompositeCommand {
@ -12,7 +13,7 @@ public class AdminCommand extends CompositeCommand {
@Override
public void setup() {
this.addSubCommand(new AdminVersionCommand());
}
@Override

View File

@ -0,0 +1,27 @@
package us.tastybento.bskyblock.commands.admin;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import us.tastybento.bskyblock.BSkyBlock;
import us.tastybento.bskyblock.api.commands.CommandArgument;
import java.util.Set;
public class AdminVersionCommand extends CommandArgument {
public AdminVersionCommand() {
super("version");
}
@Override
public boolean execute(CommandSender sender, String[] args) {
sender.sendMessage(Bukkit.getBukkitVersion());
sender.sendMessage("BSB " + BSkyBlock.getPlugin().getDescription().getVersion());
return true;
}
@Override
public Set<String> tabComplete(CommandSender sender, String[] args) {
return null;
}
}