Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-04 23:30:17 +01:00
Move 'remoteServer' to GeyserConnector
Dieser Commit ist enthalten in:
Ursprung
17b99a80fe
Commit
96dbe40ba5
@ -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));
|
||||
|
@ -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:
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren