Add getConsole() to the API
This commit is contained in:
parent
758e196479
commit
3dac86a94c
@ -211,4 +211,13 @@ public abstract class ProxyServer
|
|||||||
* @return the constructed instance
|
* @return the constructed instance
|
||||||
*/
|
*/
|
||||||
public abstract ServerInfo constructServerInfo(String name, InetSocketAddress address);
|
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();
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.Synchronized;
|
import lombok.Synchronized;
|
||||||
import static net.md_5.bungee.Logger.$;
|
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.ProxyServer;
|
||||||
import net.md_5.bungee.api.ReconnectHandler;
|
import net.md_5.bungee.api.ReconnectHandler;
|
||||||
import net.md_5.bungee.api.TabListHandler;
|
import net.md_5.bungee.api.TabListHandler;
|
||||||
@ -371,4 +372,10 @@ public class BungeeCord extends ProxyServer
|
|||||||
{
|
{
|
||||||
return new BungeeServerInfo( name, address );
|
return new BungeeServerInfo( name, address );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommandSender getConsole()
|
||||||
|
{
|
||||||
|
return ConsoleCommandSender.getInstance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user