Skip to content

Conversation

@Camotoy
Copy link
Member

@Camotoy Camotoy commented Aug 31, 2024

The primary goal of this PR is to facilitate config changes required for the Floodgate merge, while also allowing for automatic config file generation and updates, as well as customizing configs depending on the features available to a platform.

We have also decided to remove usage of the Jackson library within Geyser. While it has its benefits over Gson, ultimately all platforms have Gson access (and our libraries utilize Gson alongside that) and Jackson is a hefty dependency to shade within Geyser.

User-facing Configuration Changes

This update introduces a major refactor of the Geyser configuration file to improve clarity and organization. Your existing configuration will be automatically migrated.

Main Changes:

  • The configuration is now split into more logical sections: java, bedrock, motd, gameplay, and advanced.
  • Platform-specific options are now handled more intelligently. For example, Java server address/port settings are removed from plugin versions (Paper, Velocity, Fabric, etc.) as Geyser can now detect them automatically.

Removals

  • allow-custom-skulls: This option has been removed. To disable custom skulls, set gameplay.max-visible-custom-skulls to 0.
  • emote-offhand-workaround: This workaround has split into two things:
    • show-emotes: A config option in the "gameplay" section whether emotes should be shown to other Bedrock players
    • EmoteOffhand: a small Geyser extension to switch items when emoting. This can be downloaded on our downloads page or its modrinth page.
  • remote.address: auto: The auto value is no longer used. On standalone, it will be converted to 127.0.0.1. On plugin versions, the java.address and java.port options are removed entirely as they are auto-detected.
  • legacy-ping-passthrough (Standalone): This option was non-functional on Geyser-Standalone and has been removed there; on other platforms it is now inverted and called integrated-ping-passthrough.

Renames & Moves

Many options have been renamed or moved into new sections. Here is a summary of the most notable changes:

  • remote section -> Renamed to java.
  • bedrock section -> Many options moved out:
    • motd1/motd2 -> motd.primary-motd / motd.secondary-motd.
    • server-name -> gameplay.server-name.
    • broadcast-port, compression-level, etc. -> advanced.bedrock section.
  • motd section (New): Now contains all MOTD and ping-related settings.
    • passthrough-motd, passthrough-player-counts, ping-passthrough-interval, max-players are now here.
    • legacy-ping-passthrough -> Renamed to integrated-ping-passthrough and its boolean value is now inverted
  • gameplay section (New): Contains most options that affect the player experience.
    • command-suggestions, show-coordinates, forward-player-ping, etc. are now here.
    • add-non-bedrock-items -> Renamed to enable-custom-content.
    • above-bedrock-nether-building -> Renamed to nether-roof-workaround.
  • advanced section (New): Contains settings for advanced users and specific use cases.
    • cache-images, scoreboard-packet-threshold, floodgate-key-file, etc. are now here.
    • bedrock.enable-proxy-protocol -> advanced.bedrock.use-haproxy-protocol.
    • bedrock.proxy-protocol-whitelisted-ips -> advanced.bedrock.haproxy-protocol-whitelisted-ips
    • remote.use-proxy-protocol -> advanced.java.use-haproxy-protocol.

Additions

  • gameplay.enable-integrated-pack: When true, Geyser will automatically serve the now integrated GeyserOptionalPack, which provides visual fixes and Java-parity features for Bedrock clients.
  • gameplay.show-emotes: Whether to broadcast Bedrock Edition emotes to all other Bedrock edition players.
  • advanced.resource-pack-urls: Allows loading remote resource packs. Bedrock is very picky about these, hence why it's an advanced option.

Further, the metrics section has been removed on platforms that natively support metrics to respect platform-wide configuration. On platforms where it isn't supported, metrics/uuid is now metrics-uuid, and metrics/enabled is now enable-metrics.

The config file is split into two files - config.yml and config-advanced.yml (name subject to change to something that will always place it below config.yml alphabetically). The primary config will consist of values that a typical user needs to change for a typical setup or other basic config values. The advanced config will consist of values that we don't want most users to change, while still being accessible to tech-savvy users. This will be done at a later date.
The ultimate goal is to keep setup super-simple while still allowing Geyser to be customizable.

Metrics config options are now moved to platform global configs, if they currently exist.

Camotoy and others added 25 commits May 23, 2024 19:57
Improve node ordering when updating configs
onebeastchris and others added 5 commits November 5, 2025 22:25
…#5964)

* Add automatic downloading of the GeyserOptionalPack

* Warn about including the OptionalPack from extensions when Geyser is already including it instead of throwing.

* Copy optional pack instead of downloading

---------

Co-authored-by: onebeastchris <[email protected]>
@onebeastchris onebeastchris requested a review from Copilot November 8, 2025 14:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request migrates Geyser's JSON processing and configuration management from Jackson/custom YAML to Gson and Spongepowered Configurate. The changes include:

  • Replacement of Jackson dependency with Gson for JSON serialization/deserialization
  • Migration to Spongepowered Configurate for YAML configuration handling
  • Updates to all JSON processing code throughout the codebase
  • Addition of comprehensive test fixtures for configuration migration testing
  • Refactoring of configuration interfaces to use record-style accessor methods

Reviewed Changes

Copilot reviewed 147 out of 148 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
gradle/libs.versions.toml Updated dependencies: removed Jackson, added Gson 2.10.1, Configurate 4.2.0, and related libraries
core/src/test/resources/configuration/* Added test fixtures for configuration loading and migration testing (legacy, default, invalid, all-changed scenarios)
core/src/test/java/.../ConfigLoaderTest.java New comprehensive test suite for configuration loading and migration
core/src/test/java/.../GeyserMockContext.java Updated mock configuration to use new config interface methods
core/src/main/java/.../util/* Migrated WebUtils, VersionCheckUtils, FileUtils, AssetUtils from Jackson to Gson
core/src/main/java/.../util/metrics/* New metrics platform abstraction replacing old Metrics class
core/src/main/java/.../text/* Updated locale and serialization code to use Gson
core/src/main/java/.../skin/* Migrated skin provider and manager from Jackson to Gson
core/src/main/java/.../session/* Updated session classes to use new config accessor methods
core/src/main/java/.../translator/* Updated translators to use new config method signatures
core/src/main/java/.../registry/* Migrated registry populators and mappings readers to Gson
Comments suppressed due to low confidence (1)

core/src/main/java/org/geysermc/geyser/event/type/SessionLoadResourcePacksEventImpl.java:65


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (!IP_REGEX.matcher(remoteAddress).matches() && !remoteAddress.equalsIgnoreCase("localhost")) {
String[] record = WebUtils.findSrvRecord(this, remoteAddress);
if (record != null) {
int remotePort = Integer.parseInt(record[2]);
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential uncaught 'java.lang.NumberFormatException'.

Copilot uses AI. Check for mistakes.
…m the "packs" folder, add another legacy config test
# Conflicts:
#	core/src/main/java/org/geysermc/geyser/GeyserImpl.java
#	core/src/main/java/org/geysermc/geyser/session/GeyserSession.java
#	core/src/main/java/org/geysermc/geyser/util/LoginEncryptionUtils.java
@onebeastchris onebeastchris merged commit 765128c into master Nov 18, 2025
6 of 14 checks passed
Shanwer pushed a commit to Shanwer/Geyser that referenced this pull request Nov 19, 2025
* Start implementing Configurate config system

* More development

* Start migrating to Gson only

* Progress

* Update usage of WebUtils

* Most things now use Gson for JSON

* Allow tests to succeed by using new Gson version

* Use slightly cleaner version for Version deserializer

* Work around older Gson versions without record support

* GeyserCustomSkullConfiguration uses Configurate

* Fix regression in properties get

* New config used in core

* The configuration is gone. Long live the config.

* More changes and migrations away from Jackson

* Improve node ordering when updating configs

* typo

* Better check for ignoring non-configurate configs for considering comment moving

* Ensure metrics UUID is valid

* Initial advanced config

* Remove Jackson; finish config value placements

* Remove duplicate relocate declarations

* Let annotations work

* Renaming to PluginSpecific

* Use global bStats config where possible

* Fix test

* Re-introduce asterisk behavior in configs

* Remove GeyserPluginBootstrap as it's no longer necessary

* Remove old config.yml file

* Update Xbox achievement comment

* Apply suggestions from code review

Co-authored-by: chris <[email protected]>

* No need to remove values anymore

* Fix: disable bstats relocation on platforms where it is not needed

* ensure it builds

* Update custom unavailable slot comment

Co-authored-by: chris <[email protected]>

* Update cooldown image

* Logger message for direct-compression still being enabled

* oops

* More explicit RuntimeException message

Co-authored-by: Konicai <[email protected]>

* Constant for 'system' locale

* Better config JSON encoding (something is broken with Cloudflare; we'll figure it out

* Fix broadcast port default

* Add this file too

* Update configurate branch

* fix build

* Fix: Allow using custom config file on Standalone, add relocation comment

* Move config loading to GeyserBootstrap interface

* Add and rename some config options, add section notes (GeyserMC#5390)

* Add and rename some config options, add section notes

* adjust message

* Update core/src/main/java/org/geysermc/geyser/command/defaults/ConnectionTestCommand.java

Co-authored-by: Eclipse <[email protected]>

* Update core/src/main/java/org/geysermc/geyser/configuration/GeyserConfig.java

Co-authored-by: Eclipse <[email protected]>

* Update ConfigLoader.java

* Update AdvancedConfig.java

* clarify that we're talking about the HAProxy protocol

* rename config option to use-haproxy-protocol

* remove ominous warning sign on xbox auth warning

* adjust wording

---------

Co-authored-by: Eclipse <[email protected]>

* Back to one config file

* Some minor touchups

* Configurate: Sectionification (GeyserMC#5904)

* Init: config sections

* Start on adding tests, move migrations over to ConfigMigrations class

* Get rid of auth section again, rename that one config option, fix mtu migration

* Move custom skulls config options to the bottom of the gameplay settings

* Add more tests

* Rename and migrate proxy-protocol-whitelisted-ips to haproxy-protocol-whitelisted-ips

* Add automatic downloading of the GeyserOptionalPack

* Revert "Add automatic downloading of the GeyserOptionalPack"

This reverts commit 65b9620.

* Add more invalid config tests

* Warn about emote-offhand-workaround removal

* Add automatic loading of the GeyserOptionalPack (feature/configurate) (GeyserMC#5964)

* Add automatic downloading of the GeyserOptionalPack

* Warn about including the OptionalPack from extensions when Geyser is already including it instead of throwing.

* Copy optional pack instead of downloading

---------

Co-authored-by: onebeastchris <[email protected]>

* Remove unused variable

* Start warning users not running Java 21

* Update tests, temporarily remove NumericRanges test

* Remove duplicate advanced section from Geyser dump

* Address some "reviews"

* yeet md5 hash from geyser dump

* Add info about number of resource packs / amount of mappings into Geyser dump

* Re-enable invalid config loading test

* Fix: allow-custom-skulls migration

* Fix test

* Add "enable-emotes" configuration option

* Rename "emotes-enabled" to "show-emotes"

* Only enable integrated pack when optional pack isn't present

* Update integrated pack

* Exclude jackson annotations, remove leftover debug print

* Remove one-time config migration warnings as we don't have access to the logger at that stage

* Throw more detailed descriptive error when loading resource packs from the "packs" folder, add another legacy config test

* Fix NeoForge's fun module conflict

* Re-add warning about moved functionality, fix Geyser-ViaProxy

This reverts commit fbadfa5.

* oops

* Move GeyserLegacyPingPassthrough to separate thread to avoid Standalone command locking issues

---------

Co-authored-by: Konicai <[email protected]>
Co-authored-by: chris <[email protected]>
Co-authored-by: Eclipse <[email protected]>
Co-authored-by: Aurora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Needs Testing When a PR needs testing but is currently not under review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expired Discord CDN links Per-Platform Configuration Options

6 participants