mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
fix nullability of playerlist header/footer, closes #5290
This commit is contained in:
parent
b0df4d17c8
commit
de5a2a4108
1 changed files with 4 additions and 4 deletions
|
@ -2045,14 +2045,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@Override
|
||||
public void setPlayerListHeader(String header) {
|
||||
- this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true);
|
||||
+ this.playerListHeader = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(header); // Paper - Adventure
|
||||
+ this.playerListHeader = header == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(header); // Paper - Adventure
|
||||
updatePlayerListHeaderFooter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlayerListFooter(String footer) {
|
||||
- this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true);
|
||||
+ this.playerListFooter = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure
|
||||
+ this.playerListFooter = footer == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure
|
||||
updatePlayerListHeaderFooter();
|
||||
}
|
||||
|
||||
|
@ -2060,8 +2060,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public void setPlayerListHeaderFooter(String header, String footer) {
|
||||
- this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true);
|
||||
- this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true);
|
||||
+ this.playerListHeader = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(header); // Paper - Adventure
|
||||
+ this.playerListFooter = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure
|
||||
+ this.playerListHeader = header == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(header); // Paper - Adventure
|
||||
+ this.playerListFooter = footer == null ? null : io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(footer); // Paper - Adventure
|
||||
updatePlayerListHeaderFooter();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue