mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
fix nullability of playerlist header/footer, closes #5290
This commit is contained in:
parent
45bc531dd3
commit
5b5989b213
1 changed files with 5 additions and 5 deletions
|
@ -1978,7 +1978,7 @@ index 96b55867d8bfbc85cb290da9b320ec74b9dbb179..513d24877c336b6e32f2ef939788d108
|
|||
player.activeContainer.addSlotListener(player);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 1cbf0fd6c0f2d1fa62f944162cd9320c640d8530..5f55e3816f1e00be6e4ae573cc09eb19b59adf74 100644
|
||||
index 1cbf0fd6c0f2d1fa62f944162cd9320c640d8530..32a8a074600519ec2075229bbd02ca1e4123a70f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -240,14 +240,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -2045,14 +2045,14 @@ index 1cbf0fd6c0f2d1fa62f944162cd9320c640d8530..5f55e3816f1e00be6e4ae573cc09eb19
|
|||
@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 1cbf0fd6c0f2d1fa62f944162cd9320c640d8530..5f55e3816f1e00be6e4ae573cc09eb19
|
|||
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