Package septogeddon.pluginquery.velocity
Class VelocityPluginQuery
java.lang.Object
septogeddon.pluginquery.velocity.VelocityPluginQuery
- All Implemented Interfaces:
QueryListener
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.velocitypowered.api.proxy.messages.ChannelIdentifier
Deprecated.protected static final com.velocitypowered.api.proxy.messages.ChannelIdentifier
static final QueryMetadataKey
<com.velocitypowered.api.proxy.server.RegisteredServer> Metadata Key forRegisteredServer
static final QueryMetadataKey
<VelocityRemoteObjectMessenger> Metadata forProxyServer
onRemoteObject
-
Constructor Summary
ConstructorDescriptionVelocityPluginQuery
(com.velocitypowered.api.proxy.ProxyServer server, org.slf4j.Logger logger, Path folder) -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryConnection
getConnection
(com.velocitypowered.api.proxy.server.RegisteredServer server) Get active connection forRegisteredServer
org.slf4j.Logger
com.velocitypowered.api.proxy.ProxyServer
void
void
onConnectionStateChange
(QueryConnection connection) Called whenQueryConnection.isConnected()
value changedvoid
onQueryReceived
(QueryConnection connection, String channel, byte[] message) Called when the connection received a query messagevoid
pluginMessageEvent
(com.velocitypowered.api.event.connection.PluginMessageEvent event) void
void
sendMessage
(com.velocitypowered.api.proxy.Player player, String message) void
shutdown
(com.velocitypowered.api.event.proxy.ProxyShutdownEvent e) void
-
Field Details
-
REGISTERED_SERVER
public static final QueryMetadataKey<com.velocitypowered.api.proxy.server.RegisteredServer> REGISTERED_SERVERMetadata Key forRegisteredServer
-
REMOTEOBJECT_PROXYSERVER
Metadata forProxyServer
onRemoteObject
-
LEGACY_IDENTIFIER
@Deprecated protected static final com.velocitypowered.api.proxy.messages.ChannelIdentifier LEGACY_IDENTIFIERDeprecated. -
MODERN_IDENTIFIER
protected static final com.velocitypowered.api.proxy.messages.ChannelIdentifier MODERN_IDENTIFIER
-
-
Constructor Details
-
VelocityPluginQuery
@Inject public VelocityPluginQuery(com.velocitypowered.api.proxy.ProxyServer server, org.slf4j.Logger logger, Path folder)
-
-
Method Details
-
getConnection
public static QueryConnection getConnection(com.velocitypowered.api.proxy.server.RegisteredServer server) Get active connection forRegisteredServer
- Parameters:
server
-- Returns:
- a QueryConnection used to connect to specified server
-
initializeConnectors
public void initializeConnectors() -
pluginMessageEvent
public void pluginMessageEvent(com.velocitypowered.api.event.connection.PluginMessageEvent event) -
shutdown
public void shutdown(com.velocitypowered.api.event.proxy.ProxyShutdownEvent e) -
sendMessage
-
getEncryption
-
shutdownConnectors
public void shutdownConnectors() -
reloadConfig
public void reloadConfig() -
getDataFolder
-
getQueryConfig
-
getLogger
public org.slf4j.Logger getLogger() -
getServer
public com.velocitypowered.api.proxy.ProxyServer getServer() -
onConnectionStateChange
Description copied from interface:QueryListener
Called whenQueryConnection.isConnected()
value changed- Specified by:
onConnectionStateChange
in interfaceQueryListener
- Parameters:
connection
-
-
onQueryReceived
Description copied from interface:QueryListener
Called when the connection received a query message- Specified by:
onQueryReceived
in interfaceQueryListener
- Parameters:
connection
-channel
-message
-
-