3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 14:30:17 +01:00

Move 'remoteServer' to GeyserConnector

Dieser Commit ist enthalten in:
RednedEpic 2019-07-10 12:52:29 -05:00
Ursprung 17b99a80fe
Commit 96dbe40ba5
2 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -31,6 +31,7 @@ import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.console.ConsoleCommandReader;
import org.geysermc.connector.console.GeyserLogger;
import org.geysermc.connector.network.ConnectorServerEventHandler;
import org.geysermc.connector.network.remote.RemoteJavaServer;
import org.geysermc.connector.plugin.GeyserPluginLoader;
import org.geysermc.connector.plugin.GeyserPluginManager;
@ -51,6 +52,9 @@ public class GeyserConnector implements Connector {
private static GeyserConnector instance;
@Getter
private RemoteJavaServer remoteServer;
@Getter
private Logger logger;
@ -109,6 +113,8 @@ public class GeyserConnector implements Connector {
commandMap = new GeyserCommandMap(this);
remoteServer = new RemoteJavaServer(config.getRemote().getAddress(), config.getRemote().getPort());
Geyser.setConnector(this);
pluginManager = new GeyserPluginManager(new GeyserPluginLoader(this));

Datei anzeigen

@ -79,9 +79,7 @@ public class UpstreamPacketHandler implements BedrockPacketHandler {
public boolean handle(ResourcePackClientResponsePacket textPacket) {
switch (textPacket.getStatus()) {
case COMPLETED:
// Start connecting to remote server
RemoteJavaServer remoteServer = new RemoteJavaServer(connector.getConfig().getRemote().getAddress(), connector.getConfig().getRemote().getPort());
session.connect(remoteServer);
session.connect(connector.getRemoteServer());
connector.getLogger().info("Player connected with " + session.getAuthenticationData().getName());
break;
case HAVE_ALL_PACKS: