Package de.themoep.connectorplugin
Class ProxyBridgeCommon<P extends ConnectorPlugin<R>,R>
java.lang.Object
de.themoep.connectorplugin.BridgeCommon<P,R>
de.themoep.connectorplugin.ProxyBridgeCommon<P,R>
-
Nested Class Summary
Nested classes/interfaces inherited from class de.themoep.connectorplugin.BridgeCommon
BridgeCommon.Action, BridgeCommon.BridgeMessage, BridgeCommon.PlayerInfo
-
Field Summary
Fields inherited from class de.themoep.connectorplugin.BridgeCommon
consumers, playerInfoMap, plugin, RANDOM, responses
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract BridgeCommon.PlayerInfo
createPlayerInfo
(R player) Create a player info object for a playerprotected abstract R
Get a player by nameprotected void
onPlayerJoin
(BridgeCommon.PlayerInfo playerInfo) protected void
onPlayerLeave
(String player) protected abstract void
registerServerCommands
(String server) Register all known commands on a serverrunProxyConsoleCommand
(String command, Consumer<String>... consumer) Run a console command on all other proxiesprotected void
sendResponseData
(String target, byte[] out) Methods inherited from class de.themoep.connectorplugin.BridgeCommon
addPlayerInfo, getLocation, getLocation, getServer, getServer, handleResponse, isTeleporting, markTeleporting, registerHandler, registerMessageHandler, removePlayerInfo, runProxyConsoleCommand, runServerConsoleCommand, sendData, sendData, sendData, sendResponse, sendResponseMessage, teleport, teleport, teleport, teleport, teleport, teleport, unmarkTeleporting
-
Constructor Details
-
ProxyBridgeCommon
-
-
Method Details
-
sendResponseData
- Specified by:
sendResponseData
in classBridgeCommon<P extends ConnectorPlugin<R>,
R>
-
runProxyConsoleCommand
public CompletableFuture<Boolean> runProxyConsoleCommand(String command, Consumer<String>... consumer) Run a console command on all other proxies- Parameters:
command
- The command to runconsumer
- Optional Consumer (or multiple) for the messages triggered by the command- Returns:
- A future for whether the command was run successfully
-
onPlayerJoin
-
onPlayerLeave
-
registerServerCommands
Register all known commands on a server- Parameters:
server
- The server
-
getPlayer
Get a player by name- Parameters:
playerName
- The name of the player- Returns:
- The player
-
createPlayerInfo
Create a player info object for a player- Parameters:
player
- The player- Returns:
- The player info object
-