diff --git a/api/src/main/java/net/md_5/bungee/api/ProxyServer.java b/api/src/main/java/net/md_5/bungee/api/ProxyServer.java index 9cdf2324..a9d05477 100644 --- a/api/src/main/java/net/md_5/bungee/api/ProxyServer.java +++ b/api/src/main/java/net/md_5/bungee/api/ProxyServer.java @@ -211,4 +211,13 @@ public abstract class ProxyServer * @return the constructed instance */ public abstract ServerInfo constructServerInfo(String name, InetSocketAddress address); + + /** + * Returns the console overlord for this proxy. Being the console, this + * command server cannot have permissions or groups, and will be able to + * execute anything. + * + * @return the console command sender of this proxy + */ + public abstract CommandSender getConsole(); } diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index cdf0ac67..6b50c506 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -28,6 +28,7 @@ import lombok.Getter; import lombok.Setter; import lombok.Synchronized; import static net.md_5.bungee.Logger.$; +import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.ReconnectHandler; import net.md_5.bungee.api.TabListHandler; @@ -371,4 +372,10 @@ public class BungeeCord extends ProxyServer { return new BungeeServerInfo( name, address ); } + + @Override + public CommandSender getConsole() + { + return ConsoleCommandSender.getInstance(); + } }