mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-09-10 05:08:04 +02:00
Add Bungee command.
This commit is contained in:
parent
91ac250d35
commit
90e1bc6dd8
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
15
src/main/java/net/md_5/bungee/command/CommandBungee.java
Normal file
15
src/main/java/net/md_5/bungee/command/CommandBungee.java
Normal 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());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user