1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-27 18:59:17 +00:00

More development

This commit is contained in:
Camotoy
2024-05-26 22:20:53 -04:00
parent dedb5920c2
commit a135d3c4da
3 changed files with 36 additions and 5 deletions

View File

@@ -260,6 +260,15 @@ public interface GeyserConfig {
void port(int port);
@Override
@Comment("""
What type of authentication Bedrock players will be checked against when logging into the Java server.
Can be floodgate (see https://wiki.geysermc.org/floodgate/), online, or offline.""")
@NonNull
default AuthType authType() {
return AuthType.ONLINE;
}
@Comment("""
Whether to enable PROXY protocol or not while connecting to the server.
This is useful only when:
@@ -322,6 +331,7 @@ public interface GeyserConfig {
@DefaultNumeric(1400)
int mtu();
@Comment("Do not change!")
default int version() {
return Constants.CONFIG_VERSION;
}

View File

@@ -57,12 +57,31 @@ public interface GeyserPluginConfig extends GeyserConfig {
return GeyserImpl.getInstance().getBootstrap().getServerBindAddress();
}
@Override
default void address(String address) {
throw new IllegalStateException();
}
@Override
@Exclude
default int port() {
return GeyserImpl.getInstance().getBootstrap().getServerPort();
}
@Override
default void port(int port) {
throw new IllegalStateException();
}
// @Nonnull
// @Comment("""
// What type of authentication Bedrock players will be checked against when logging into the Java server.
// Floodgate allows Bedrock players to join without needing a Java account. It's not recommended to change this.""")
// @Override
// default AuthType authType() {
// return AuthType.FLOODGATE;
// }
@Override
@Exclude
default boolean forwardHostname() {

View File

@@ -25,7 +25,8 @@
package org.geysermc.geyser.configuration;
import org.spongepowered.configurate.interfaces.meta.Exclude;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.network.AuthType;
import org.spongepowered.configurate.interfaces.meta.defaults.DefaultNumeric;
import org.spongepowered.configurate.interfaces.meta.defaults.DefaultString;
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
@@ -36,6 +37,8 @@ import org.spongepowered.configurate.objectmapping.meta.Comment;
*/
@ConfigSerializable
public interface GeyserRemoteConfig extends GeyserConfig {
// @Override // For config placement
// BedrockConfig bedrock();
@Override
RemoteConfig java();
@@ -52,10 +55,9 @@ public interface GeyserRemoteConfig extends GeyserConfig {
@DefaultNumeric(25565)
int port();
@Override
@Exclude
default int protocolVersion() {
return JavaConfig.super.protocolVersion();
@Override // For config placement
default @NonNull AuthType authType() {
return JavaConfig.super.authType();
}
@Override