Skip to content

Merge comments in YAMLs#3

Open
Mapacheee wants to merge 4 commits intothewinterframework:masterfrom
Mapacheee:master
Open

Merge comments in YAMLs#3
Mapacheee wants to merge 4 commits intothewinterframework:masterfrom
Mapacheee:master

Conversation

@Mapacheee
Copy link
Copy Markdown
Contributor

@Mapacheee Mapacheee commented Apr 23, 2026

this PR improves the configuration system by adding support for comments. By default, the winterframework uses SpongePowered Configurate (SnakeYAML), but it doesnt support preserving comments during loads/saves.
to fix this, we now use a custom YamlCommentWriter to handle configuration updates while keeping comments intact!!!

If you have this:

  far-players:
    # Update interval for far-player movement packets.
    move-ticks: 4
    # Update interval for far-player equipment/metadata packets.
    equip-ticks: 20

and you will add a new config:

  far-players:
    # another comment
    test: 20

the final file will be:

  far-players:
    # Update interval for far-player movement packets.
    move-ticks: 4
    # Update interval for far-player equipment/metadata packets.
    equip-ticks: 20
    # another comment
    test: 20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant