public abstract class ProxyServer
extends java.lang.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(java.lang.String message)
Deprecated.
|
abstract ServerInfo |
constructServerInfo(java.lang.String name,
java.net.InetSocketAddress address,
java.lang.String motd,
boolean restricted)
Factory method to construct an implementation specific server info
instance.
|
abstract Title |
createTitle()
Creates a new empty title configuration.
|
abstract java.util.Collection<java.lang.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 java.util.Collection<java.lang.String> |
getDisabledCommands()
Gets the commands which are disabled and will not be run on this proxy.
|
abstract java.lang.String |
getGameVersion()
Deprecated.
|
abstract java.util.logging.Logger |
getLogger()
Gets the main logger which can be used as a suitable replacement for
System.out and System.err. |
abstract java.lang.String |
getName()
Gets the name of the currently running proxy software.
|
abstract int |
getOnlineCount()
Get the current number of connected users.
|
abstract ProxiedPlayer |
getPlayer(java.lang.String name)
Gets a connected player via their unique username.
|
abstract ProxiedPlayer |
getPlayer(java.util.UUID uuid)
Gets a connected player via their UUID
|
abstract java.util.Collection<ProxiedPlayer> |
getPlayers()
Return all players currently connected.
|
abstract PluginManager |
getPluginManager()
Get the
PluginManager associated with loading plugins and
dispatching events. |
abstract java.io.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(java.lang.String name)
Gets the server info of a server.
|
abstract java.util.Map<java.lang.String,ServerInfo> |
getServers()
Deprecated.
The returned map is part of the proxy's internal state,
and may be modified concurrently by the proxy.
The safe alternative is
getServersCopy(). |
abstract java.util.Map<java.lang.String,ServerInfo> |
getServersCopy()
Return all servers registered to this proxy, keyed by name.
|
abstract java.lang.String |
getTranslation(java.lang.String name,
java.lang.Object... args)
Gets a localized string from the .properties file.
|
abstract java.lang.String |
getVersion()
Gets the version of the currently running proxy software.
|
abstract java.util.Collection<ProxiedPlayer> |
matchPlayer(java.lang.String match)
Attempts to match any players with the given name, and returns a list of
all possible matches.
|
abstract void |
registerChannel(java.lang.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 |
start()
Start this instance so that it may accept connections.
|
abstract void |
stop()
Gracefully mark this instance for shutdown.
|
abstract void |
stop(java.lang.String reason)
Gracefully mark this instance for shutdown.
|
abstract void |
unregisterChannel(java.lang.String channel)
Unregister a previously registered channel.
|
public static void setInstance(ProxyServer instance)
instance - the new instance to setpublic abstract java.lang.String getName()
public abstract java.lang.String getVersion()
public abstract java.lang.String getTranslation(java.lang.String name,
java.lang.Object... args)
public abstract java.util.logging.Logger getLogger()
System.out and System.err.Logger instancepublic abstract java.util.Collection<ProxiedPlayer> getPlayers()
public abstract ProxiedPlayer getPlayer(java.lang.String name)
name - of the playerpublic abstract ProxiedPlayer getPlayer(java.util.UUID uuid)
uuid - of the player@Deprecated public abstract java.util.Map<java.lang.String,ServerInfo> getServers()
getServersCopy().ConfigurationAdapter.getServers(), this will not
return a fresh map each time.public abstract java.util.Map<java.lang.String,ServerInfo> getServersCopy()
public abstract ServerInfo getServerInfo(java.lang.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(java.lang.String reason)
reason - the reason for stopping. This will be shown to players.public abstract void start()
throws java.lang.Exception
java.lang.Exception - any exception thrown during startup causing the
instance to fail to bootpublic abstract void registerChannel(java.lang.String channel)
channel - the channel to registerpublic abstract void unregisterChannel(java.lang.String channel)
channel - the channel to unregisterpublic abstract java.util.Collection<java.lang.String> getChannels()
@Deprecated public abstract java.lang.String getGameVersion()
@Deprecated public abstract int getProtocolVersion()
public abstract ServerInfo constructServerInfo(java.lang.String name, java.net.InetSocketAddress address, java.lang.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 java.io.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(java.lang.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 java.util.Collection<java.lang.String> getDisabledCommands()
public abstract ProxyConfig getConfig()
public abstract java.util.Collection<ProxiedPlayer> matchPlayer(java.lang.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.TitleCopyright © 2015-2018 WaterfallMC. All Rights Reserved.