Package de.themoep.connectorplugin.limbo
Class Bridge
java.lang.Object
de.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
de.themoep.connectorplugin.ServerBridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
de.themoep.connectorplugin.limbo.Bridge
- All Implemented Interfaces:
com.loohp.limbo.events.Listener
public class Bridge
extends de.themoep.connectorplugin.ServerBridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
implements com.loohp.limbo.events.Listener
-
Nested Class Summary
Nested classes/interfaces inherited from class de.themoep.connectorplugin.ServerBridgeCommon
de.themoep.connectorplugin.ServerBridgeCommon.LocationTeleportRequest, de.themoep.connectorplugin.ServerBridgeCommon.LoginRequest, de.themoep.connectorplugin.ServerBridgeCommon.PlayerTeleportRequestNested classes/interfaces inherited from class de.themoep.connectorplugin.BridgeCommon
de.themoep.connectorplugin.BridgeCommon.Action, de.themoep.connectorplugin.BridgeCommon.BridgeMessage, de.themoep.connectorplugin.BridgeCommon.PlayerInfo -
Field Summary
Fields inherited from class de.themoep.connectorplugin.BridgeCommon
consumers, playerInfoMap, plugin, RANDOM, responses -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionde.themoep.connectorplugin.LocationInfoadapt(com.loohp.limbo.location.Location location) com.loohp.limbo.location.Locationadapt(de.themoep.connectorplugin.LocationInfo location) CompletableFuture<de.themoep.connectorplugin.LocationInfo> getLocation(com.loohp.limbo.player.Player player) Get the location a player is connected togetServer(com.loohp.limbo.player.Player player) Get the server a player is connected tovoidonPlayerJoin(com.loohp.limbo.events.player.PlayerJoinEvent event) voidonPlayerQuit(com.loohp.limbo.events.player.PlayerQuitEvent event) voidonPlayerSpawnEvent(com.loohp.limbo.events.player.PlayerSpawnEvent event) runProxyPlayerCommand(com.loohp.limbo.player.Player player, String command) Run a command for a player on the proxy they are connected to.final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, com.loohp.limbo.player.Player target, Consumer<String>... consumer) final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer) final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, String serverName, String worldName, Consumer<String>... consumer) final CompletableFuture<Boolean> teleport(String playerName, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer) final CompletableFuture<Boolean> final CompletableFuture<Boolean> Methods inherited from class de.themoep.connectorplugin.ServerBridgeCommon
runProxyConsoleCommand, sendResponseData, sendStarted, sendToServerMethods inherited from class de.themoep.connectorplugin.BridgeCommon
addPlayerInfo, getLocation, getServer, handleResponse, isTeleporting, markTeleporting, registerHandler, registerMessageHandler, removePlayerInfo, runProxyConsoleCommand, runServerConsoleCommand, sendData, sendData, sendData, sendResponse, sendResponseMessage, unmarkTeleporting
-
Constructor Details
-
Bridge
-
-
Method Details
-
onPlayerSpawnEvent
@EventHandler public void onPlayerSpawnEvent(com.loohp.limbo.events.player.PlayerSpawnEvent event) -
onPlayerJoin
@EventHandler public void onPlayerJoin(com.loohp.limbo.events.player.PlayerJoinEvent event) -
onPlayerQuit
@EventHandler public void onPlayerQuit(com.loohp.limbo.events.player.PlayerQuitEvent event) -
adapt
public com.loohp.limbo.location.Location adapt(de.themoep.connectorplugin.LocationInfo location) -
adapt
public de.themoep.connectorplugin.LocationInfo adapt(com.loohp.limbo.location.Location location) -
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, de.themoep.connectorplugin.LocationInfo location, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, String serverName, String worldName, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, String serverName, String worldName, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(com.loohp.limbo.player.Player player, com.loohp.limbo.player.Player target, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
teleport
@SafeVarargs public final CompletableFuture<Boolean> teleport(String playerName, String targetName, Consumer<String>... consumer) - Specified by:
teleportin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player>
-
getServer
Get the server a player is connected to- Specified by:
getServerin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player> - Parameters:
player- The player to get the server for- Returns:
- A future for when the server was queried
-
getLocation
public CompletableFuture<de.themoep.connectorplugin.LocationInfo> getLocation(com.loohp.limbo.player.Player player) Get the location a player is connected to- Specified by:
getLocationin classde.themoep.connectorplugin.BridgeCommon<LimboConnectorPlugin,com.loohp.limbo.player.Player> - Parameters:
player- The player to get the location for- Returns:
- A future for when the location was queried
-
runProxyPlayerCommand
public CompletableFuture<Boolean> runProxyPlayerCommand(com.loohp.limbo.player.Player player, String command) Run a command for a player on the proxy they are connected to. The player needs to have access to that command!- Parameters:
player- The player to run the command forcommand- The command to run- Returns:
- A future for whether the command was run successfully
-