Move the example servers, try order, and forced hosts out of the model's
field defaults and into default-velocity.yml only. Previously, removing a
section caused the loader to substitute the bundled examples, which reference
servers the user may not have and then fail validation. With empty code
defaults, a removed or emptied section now yields an empty collection and the
examples are seeded solely on first-start from the documented default file.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Route VelocityServer's startup and reload paths through
ConfigurationLoader.loadConfiguration(), so the proxy now reads velocity.yml
(migrating an existing velocity.toml on first start) instead of reading
velocity.toml directly. LegacyConfigurationLoader is retained behind the
migration path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement the runtime entry point for the YAML config:
- ConfigurationLoader.loadConfiguration() resolves velocity.yml, migrating a
legacy velocity.toml or writing the documented default on first start. Absent
keys fall back to the model's field defaults (matching the old getOrElse
behaviour), so existing files are never rewritten and their comments survive.
- Migration runs the legacy night-config migrations to normalise the TOML, then
writes it as YAML stamped config-version=1, preserving a custom
forwarding-secret-file location, and archives the old file as
velocity.toml.migrated.
- Forwarding secret resolution mirrors the legacy path (env var, then the
forwarding-secret-file, creating it if absent) and is injected via a new
package-private setter; the secret stays out of velocity.yml.
Not yet wired into VelocityServer; that follows in the next change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire up the Configurate ObjectMapper path for the new velocity.yml format:
- Make VelocityConfiguration ObjectMapper-friendly: no-arg constructor,
non-final nested fields, transient on non-config fields (forwardingSecret,
motdAsComponent, favicon), and drop the dead gson @Expose annotations.
- Annotate Advanced/Query/Metrics @ConfigSerializable and add @Setting for the
keys the lower-case-dashed naming scheme can't derive (kick-existing-players,
packet-limiter, haproxy-protocol, accepts-transfers, query enabled/port/map).
- Add ConfigurationLoader with a LOWER_CASE_DASHED ObjectMapper factory, a YAML
loader builder, load/save helpers, and custom TypeSerializers for the dynamic
sections that don't fit object mapping: Servers (entries + try), ForcedHosts,
and PacketLimiterConfig (renamed keys).
- Add ConfigurationLoaderTest: loads the bundled default, and round-trips a
config with non-default values for every renamed/custom-mapped key so a wrong
mapping can't silently fall back to an identical default.
Part of the velocity.toml -> velocity.yml Configurate migration.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1:1 YAML port of default-velocity.toml with all documentation comments
preserved verbatim. config-version becomes an integer (baseline 1) for
Configurate's versioned transformation system; the `try` list nests under
`servers` to mirror the legacy [servers] table.
Part of the velocity.toml -> velocity.yml Configurate migration.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The 26.2 login success session ID is purely a metrics identifier. Mint
one shared UUID per proxy, regenerated when the proxy empties, mirroring
the vanilla server, instead of a random UUID per connection.
Older versions of the game, and creative mode, send itemstacks to the server
when dealing with itemstacks, annoying, the compression algo used is good at
backreferencing, which means that compressed data can balloon pretty well.
64 should more than cover most cases of legit data, we could probably be more
harsh here, but this is likely a fine balance between avoiding bombs and not
erring out on legit data.
* Add max length to more config phase packets
* Ensure all packets during non-play state are known
* Limit maximum size of play inbound packet queue
Co-authored-by: Dwarslooper <dwarslooper2910@gmx.de>
* Fix checkstyle
---------
Co-authored-by: Dwarslooper <dwarslooper2910@gmx.de>