public abstract class ProxyServer extends Object
Constructor and Description |
---|
ProxyServer() |
Modifier and Type | Method and Description |
---|---|
abstract void |
broadcast(BaseComponent... message)
Send the specified message to the console and all connected players.
|
abstract void |
broadcast(BaseComponent message)
Send the specified message to the console and all connected players.
|
abstract void |
broadcast(String message)
Deprecated.
|
abstract ServerInfo |
constructServerInfo(String name,
InetSocketAddress address,
String motd,
boolean restricted)
Factory method to construct an implementation specific server info
instance.
|
abstract ServerInfo |
constructServerInfo(String name,
SocketAddress address,
String motd,
boolean restricted)
Factory method to construct an implementation specific server info
instance.
|
abstract Title |
createTitle()
Creates a new empty title configuration.
|
abstract Collection<String> |
getChannels()
Get an immutable set of all registered plugin channels.
|
abstract ProxyConfig |
getConfig()
Gets BungeeCord's core config.
|
abstract ConfigurationAdapter |
getConfigurationAdapter()
Returns the currently in use configuration adapter.
|
abstract CommandSender |
getConsole()
Returns the console overlord for this proxy.
|
abstract Collection<String> |
getDisabledCommands()
Gets the commands which are disabled and will not be run on this proxy.
|
abstract String |
getGameVersion()
Deprecated.
|
static ProxyServer |
getInstance() |
abstract Logger |
getLogger()
Gets the main logger which can be used as a suitable replacement for
System.out and System.err . |
abstract String |
getName()
Gets the name of the currently running proxy software.
|
abstract int |
getOnlineCount()
Get the current number of connected users.
|
abstract ProxiedPlayer |
getPlayer(String name)
Gets a connected player via their unique username.
|
abstract ProxiedPlayer |
getPlayer(UUID uuid)
Gets a connected player via their UUID
|
abstract Collection<ProxiedPlayer> |
getPlayers()
Return all players currently connected.
|
abstract PluginManager |
getPluginManager()
Get the
PluginManager associated with loading plugins and
dispatching events. |
abstract File |
getPluginsFolder()
Return the folder used to load plugins from.
|
abstract int |
getProtocolVersion()
Deprecated.
|
abstract ReconnectHandler |
getReconnectHandler()
Get the currently in use reconnect handler.
|
abstract TaskScheduler |
getScheduler()
Get the scheduler instance for this proxy.
|
abstract ServerInfo |
getServerInfo(String name)
Gets the server info of a server.
|
abstract Map<String,ServerInfo> |
getServers()
Return all servers registered to this proxy, keyed by name.
|
abstract String |
getTranslation(String name,
Object... args)
Gets a localized string from the .properties file.
|
abstract String |
getVersion()
Gets the version of the currently running proxy software.
|
abstract Collection<ProxiedPlayer> |
matchPlayer(String match)
Attempts to match any players with the given name, and returns a list of
all possible matches.
|
abstract void |
registerChannel(String channel)
Register a channel for use with plugin messages.
|
abstract void |
setConfigurationAdapter(ConfigurationAdapter adapter)
Set the configuration adapter to be used.
|
static void |
setInstance(ProxyServer instance)
Sets the proxy instance.
|
abstract void |
setReconnectHandler(ReconnectHandler handler)
Sets the reconnect handler to be used for subsequent connections.
|
abstract void |
stop()
Gracefully mark this instance for shutdown.
|
abstract void |
stop(String reason)
Gracefully mark this instance for shutdown.
|
abstract void |
unregisterChannel(String channel)
Unregister a previously registered channel.
|
public static void setInstance(ProxyServer instance)
instance
- the new instance to setpublic abstract String getName()
public abstract String getVersion()
public abstract String getTranslation(String name, Object... args)
name
- translation nameargs
- translation argumentspublic abstract Logger getLogger()
System.out
and System.err
.Logger
instancepublic abstract Collection<ProxiedPlayer> getPlayers()
public abstract ProxiedPlayer getPlayer(String name)
name
- of the playerpublic abstract ProxiedPlayer getPlayer(UUID uuid)
uuid
- of the playerpublic abstract Map<String,ServerInfo> getServers()
ConfigurationAdapter.getServers()
, this will not
return a fresh map each time.public abstract ServerInfo getServerInfo(String name)
name
- the name of the configured serverpublic abstract PluginManager getPluginManager()
PluginManager
associated with loading plugins and
dispatching events. It is recommended that implementations use the
provided PluginManager class.public abstract ConfigurationAdapter getConfigurationAdapter()
public abstract void setConfigurationAdapter(ConfigurationAdapter adapter)
Plugin.onLoad()
.adapter
- the adapter to usepublic abstract ReconnectHandler getReconnectHandler()
public abstract void setReconnectHandler(ReconnectHandler handler)
handler
- the new handlerpublic abstract void stop()
public abstract void stop(String reason)
reason
- the reason for stopping. This will be shown to players.public abstract void registerChannel(String channel)
channel
- the channel to registerpublic abstract void unregisterChannel(String channel)
channel
- the channel to unregisterpublic abstract Collection<String> getChannels()
@Deprecated public abstract String getGameVersion()
@Deprecated public abstract int getProtocolVersion()
public abstract ServerInfo constructServerInfo(String name, InetSocketAddress address, String motd, boolean restricted)
name
- name of the serveraddress
- connectable Minecraft address + port of the servermotd
- the motd when used as a forced serverrestricted
- whether the server info restricted property will be setpublic abstract ServerInfo constructServerInfo(String name, SocketAddress address, String motd, boolean restricted)
name
- name of the serveraddress
- connectable Minecraft address + port of the servermotd
- the motd when used as a forced serverrestricted
- whether the server info restricted property will be setpublic abstract CommandSender getConsole()
public abstract File getPluginsFolder()
public abstract TaskScheduler getScheduler()
public abstract int getOnlineCount()
getPlayers()
as it does not take a lock or
make a copy.@Deprecated public abstract void broadcast(String message)
message
- the message to broadcastpublic abstract void broadcast(BaseComponent... message)
message
- the message to broadcastpublic abstract void broadcast(BaseComponent message)
message
- the message to broadcastpublic abstract Collection<String> getDisabledCommands()
public abstract ProxyConfig getConfig()
public abstract Collection<ProxiedPlayer> matchPlayer(String match)
match
- the (partial) name to matchpublic abstract Title createTitle()
Title.reset()
the current title first so your title won't be
affected by a previous one.Title
public static ProxyServer getInstance()
Copyright © 2012–2020 SpigotMC. All rights reserved.