Add Bungee command.

This commit is contained in:
md_5 2013-01-10 14:49:59 +11:00
parent 91ac250d35
commit 90e1bc6dd8
2 changed files with 17 additions and 1 deletions

View File

@ -66,7 +66,7 @@ public class BungeeCord
/**
* Current version.
*/
public String version = (getClass().getPackage().getImplementationVersion() == null) ? "unknown" : getClass().getPackage().getImplementationVersion();
public static String version = (BungeeCord.class.getPackage().getImplementationVersion() == null) ? "unknown" : BungeeCord.class.getPackage().getImplementationVersion();
/**
* Fully qualified connections.
*/
@ -98,6 +98,7 @@ public class BungeeCord
commandMap.put("ip", new CommandIP());
commandMap.put("alert", new CommandAlert());
commandMap.put("motd", new CommandMotd());
commandMap.put("bungee", new CommandBungee());
}
/**

View File

@ -0,0 +1,15 @@
package net.md_5.bungee.command;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.ChatColor;
public class CommandBungee extends Command
{
@Override
public void execute(CommandSender sender, String[] args)
{
sender.sendMessage(ChatColor.BLUE + "This server is running BungeeCord version " + BungeeCord.version + " by md_5");
sender.sendMessage(ChatColor.BLUE + "Your current permission level is " + getPermission(sender).name());
}
}