Add Bungee command.

This commit is contained in:
md_5 2013-01-10 14:49:59 +11:00
parent a3dbdae3df
commit 3d45f52518
2 changed files with 17 additions and 1 deletions

View File

@ -65,7 +65,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.
*/
@ -96,6 +96,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());
}
}