forked from GeyserMC/Geyser
Configuration updates (#653)
* Configuration updates The main feature of this commit is switching Bukkit and BungeeCord to using Jackson configuration. This allows comments to load. Along with this, the Jackson configs have been consolidated into one abstract class, and a check is made to ensure auth-type cannot be set to Floodgate if Floodgate is not installed. * Add deleted file; remove imports * Re-add changing of Bukkit port * Alphabetize import * Alphabetize Bungee import * Updates * Swap values in GeyserJacksonConfiguration * Add a null check for GeyserConnector in Bukkit's onDisable
This commit is contained in:
parent
7231758a19
commit
34b367bfc3
18 changed files with 223 additions and 641 deletions
|
@ -26,12 +26,12 @@
|
|||
package org.geysermc.platform.standalone;
|
||||
|
||||
import org.geysermc.common.PlatformType;
|
||||
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
|
||||
import org.geysermc.connector.GeyserConfiguration;
|
||||
import org.geysermc.connector.bootstrap.GeyserBootstrap;
|
||||
import org.geysermc.connector.GeyserConnector;
|
||||
import org.geysermc.connector.bootstrap.GeyserBootstrap;
|
||||
import org.geysermc.connector.configuration.GeyserConfiguration;
|
||||
import org.geysermc.connector.command.CommandManager;
|
||||
import org.geysermc.connector.ping.IGeyserPingPassthrough;
|
||||
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
|
||||
import org.geysermc.connector.utils.FileUtils;
|
||||
import org.geysermc.platform.standalone.command.GeyserCommandManager;
|
||||
|
||||
|
|
|
@ -27,110 +27,21 @@ package org.geysermc.platform.standalone;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.geysermc.connector.GeyserConfiguration;
|
||||
import org.geysermc.connector.configuration.GeyserJacksonConfiguration;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Map;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@Getter
|
||||
public class GeyserStandaloneConfiguration implements GeyserConfiguration {
|
||||
|
||||
private BedrockConfiguration bedrock;
|
||||
private RemoteConfiguration remote;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class GeyserStandaloneConfiguration extends GeyserJacksonConfiguration {
|
||||
|
||||
@JsonProperty("floodgate-key-file")
|
||||
private String floodgateKeyFile;
|
||||
|
||||
private Map<String, UserAuthenticationInfo> userAuths;
|
||||
|
||||
@JsonProperty("command-suggestions")
|
||||
private boolean isCommandSuggestions;
|
||||
|
||||
@JsonProperty("passthrough-motd")
|
||||
private boolean isPassthroughMotd;
|
||||
|
||||
@JsonProperty("passthrough-player-counts")
|
||||
private boolean isPassthroughPlayerCounts;
|
||||
|
||||
@JsonProperty("legacy-ping-passthrough")
|
||||
private boolean isLegacyPingPassthrough;
|
||||
|
||||
@JsonProperty("ping-passthrough-interval")
|
||||
private int pingPassthroughInterval;
|
||||
|
||||
@JsonProperty("max-players")
|
||||
private int maxPlayers;
|
||||
|
||||
@JsonProperty("debug-mode")
|
||||
private boolean debugMode;
|
||||
|
||||
@JsonProperty("general-thread-pool")
|
||||
private int generalThreadPool;
|
||||
|
||||
@JsonProperty("allow-third-party-capes")
|
||||
private boolean allowThirdPartyCapes;
|
||||
|
||||
@JsonProperty("allow-third-party-ears")
|
||||
private boolean allowThirdPartyEars;
|
||||
|
||||
@JsonProperty("default-locale")
|
||||
private String defaultLocale;
|
||||
|
||||
@JsonProperty("cache-chunks")
|
||||
private boolean cacheChunks;
|
||||
|
||||
@JsonProperty("above-bedrock-nether-building")
|
||||
private boolean isAboveBedrockNetherBuilding;
|
||||
|
||||
private MetricsInfo metrics;
|
||||
|
||||
@Override
|
||||
public Path getFloodgateKeyFile() {
|
||||
return Paths.get(floodgateKeyFile);
|
||||
}
|
||||
|
||||
@Getter
|
||||
public static class BedrockConfiguration implements IBedrockConfiguration {
|
||||
|
||||
private String address;
|
||||
private int port;
|
||||
|
||||
private String motd1;
|
||||
private String motd2;
|
||||
}
|
||||
|
||||
@Getter
|
||||
public static class RemoteConfiguration implements IRemoteConfiguration {
|
||||
|
||||
private String address;
|
||||
private int port;
|
||||
|
||||
private String motd1;
|
||||
private String motd2;
|
||||
|
||||
@JsonProperty("auth-type")
|
||||
private String authType;
|
||||
}
|
||||
|
||||
@Getter
|
||||
public static class UserAuthenticationInfo implements IUserAuthenticationInfo {
|
||||
private String email;
|
||||
private String password;
|
||||
}
|
||||
|
||||
@Getter
|
||||
public static class MetricsInfo implements IMetricsInfo {
|
||||
|
||||
private boolean enabled;
|
||||
|
||||
@JsonProperty("uuid")
|
||||
private String uniqueId;
|
||||
}
|
||||
|
||||
@JsonProperty("config-version")
|
||||
private int configVersion;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue