mirror of
https://github.com/GeyserMC/GeyserConnect.git
synced 2025-06-26 06:15:21 +02:00
Fix SRV support
This commit is contained in:
parent
0c2304e662
commit
3bfe81b4fe
3 changed files with 17 additions and 9 deletions
12
build.gradle
12
build.gradle
|
@ -27,16 +27,16 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
|
||||
|
||||
compileOnly 'org.geysermc.geyser:api:2.1.1-SNAPSHOT'
|
||||
compileOnly('org.geysermc.geyser:core:2.1.1-SNAPSHOT') {
|
||||
compileOnly 'org.geysermc.geyser:api:2.2.0-SNAPSHOT'
|
||||
compileOnly('org.geysermc.geyser:core:2.2.0-SNAPSHOT') {
|
||||
exclude group: 'io.netty'
|
||||
}
|
||||
|
||||
implementation 'org.xerial:sqlite-jdbc:3.41.2.2'
|
||||
implementation 'com.mysql:mysql-connector-j:8.0.33'
|
||||
implementation 'org.xerial:sqlite-jdbc:3.42.0.0'
|
||||
implementation 'com.mysql:mysql-connector-j:8.1.0'
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -48,7 +48,6 @@ import org.geysermc.geyser.api.util.PlatformType;
|
|||
import org.geysermc.geyser.session.GeyserSession;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class GeyserConnect implements Extension {
|
||||
|
@ -160,7 +159,7 @@ public class GeyserConnect implements Extension {
|
|||
return;
|
||||
}
|
||||
|
||||
Collection<GeyserSession> sessions = GeyserImpl.getInstance().getSessionManager().getSessions().values();
|
||||
GeyserSession[] sessions = getGeyserSessions();
|
||||
|
||||
switch (type) {
|
||||
case "chat":
|
||||
|
@ -208,7 +207,7 @@ public class GeyserConnect implements Extension {
|
|||
}
|
||||
}
|
||||
|
||||
for (GeyserSession session : GeyserImpl.getInstance().getSessionManager().getSessions().values()) {
|
||||
for (GeyserSession session : getGeyserSessions()) {
|
||||
String sessionIp = ip;
|
||||
|
||||
// If we are passing with a vhost construct the vhost
|
||||
|
@ -231,4 +230,8 @@ public class GeyserConnect implements Extension {
|
|||
})
|
||||
.build());
|
||||
}
|
||||
|
||||
private GeyserSession[] getGeyserSessions() {
|
||||
return this.geyserApi().onlineConnections().stream().map(connection -> (GeyserSession) connection).toList()
|
||||
}
|
||||
}
|
|
@ -54,6 +54,11 @@ public record Server(
|
|||
return this.online ? AuthType.ONLINE : AuthType.OFFLINE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean resolveSrv() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public FormImage formImage() {
|
||||
if (imageUrl != null && !imageUrl.isEmpty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue