mirror of
https://github.com/moparisthebest/xAuth
synced 2024-12-22 07:08:51 -05:00
Added version command (/xauth version)
This commit is contained in:
parent
500a9ac0dd
commit
a18a4cb336
@ -47,6 +47,8 @@ public class xAuthCommand implements CommandExecutor {
|
||||
return configCommand(sender, args);
|
||||
else if (subCommand.equals("reload"))
|
||||
return reloadCommand(sender);
|
||||
else if (subCommand.equals("version"))
|
||||
return versionCommand(sender);
|
||||
else {
|
||||
if (sender instanceof Player)
|
||||
xAuthMessages.send("admnUnknown", (Player)sender);
|
||||
@ -57,6 +59,15 @@ public class xAuthCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean versionCommand(CommandSender sender) {
|
||||
if (sender instanceof Player)
|
||||
((Player)sender).sendMessage("[" + xAuth.desc.getName() + "] This server is running version " + xAuth.desc.getVersion());
|
||||
else if (sender instanceof ConsoleCommandSender)
|
||||
xAuthLog.info("This server is running version " + xAuth.desc.getVersion());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean registerCommand(CommandSender sender, String[] args) {
|
||||
if (sender instanceof Player) {
|
||||
Player player = (Player)sender;
|
||||
|
@ -29,3 +29,4 @@ commands:
|
||||
/<command> location set|remove
|
||||
/<command> config <setting> [value]
|
||||
/<command> reload
|
||||
/<command> version
|
Loading…
Reference in New Issue
Block a user