SpongePowered / Sponge

The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
MIT License
383 stars 211 forks source link

Crash when saving game on 1.20.6 #4015

Closed SamB440 closed 4 months ago

SamB440 commented 4 months ago

Affected Product(s)

SpongeVanilla

Version

1.20.6-11.0.0-RC1607

Operating System

Windows

Java Version

21

Plugins/Mods

SpongeTestPlugin v1.0.0

Describe the bug

The server will crash when saving the game when an objective is registered.

Use the following code in a plugin:

final Scoreboard scoreboard = Sponge.server().serverScoreboard().orElseThrow();
Objective objective = Objective.builder().name("sponge-test").criterion(Criteria.DUMMY).displayName(Component.text("Tickets Left", NamedTextColor.YELLOW, TextDecoration.BOLD)).build();
scoreboard.addObjective(objective);
scoreboard.updateDisplaySlot(objective, DisplaySlots.SIDEBAR);

Then run /save-all.

Link to logs

https://pastes.dev/duEalnnKe4

aromaa commented 4 months ago

Fixes in 63200e2.