From 0c0747cd23ae67681c2b8173fff4bcc14f927f05 Mon Sep 17 00:00:00 2001 From: Pyrbu Date: Sun, 28 Jan 2024 04:11:04 +0100 Subject: [PATCH] attempt to fix empty components --- .../java/lol/pyr/znpcsplus/packets/V1_19_3PacketFactory.java | 2 +- .../main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_19_3PacketFactory.java b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_19_3PacketFactory.java index 93a727d..f1fe5e3 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_19_3PacketFactory.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_19_3PacketFactory.java @@ -30,7 +30,7 @@ public class V1_19_3PacketFactory extends V1_17PacketFactory { CompletableFuture future = new CompletableFuture<>(); skinned(player, properties, new UserProfile(entity.getUuid(), Integer.toString(entity.getEntityId()))).thenAccept(profile -> { WrapperPlayServerPlayerInfoUpdate.PlayerInfo info = new WrapperPlayServerPlayerInfoUpdate.PlayerInfo( - profile, false, 1, GameMode.CREATIVE, Component.empty(), null); + profile, false, 1, GameMode.CREATIVE, Component.text(" "), null); sendPacket(player, new WrapperPlayServerPlayerInfoUpdate(EnumSet.of(WrapperPlayServerPlayerInfoUpdate.Action.ADD_PLAYER, WrapperPlayServerPlayerInfoUpdate.Action.UPDATE_LISTED), info, info)); future.complete(null); diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java index 029c68e..05338e4 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/packets/V1_8PacketFactory.java @@ -114,7 +114,7 @@ public class V1_8PacketFactory implements PacketFactory { @Override public void createTeam(Player player, PacketEntity entity, NamedColor namedColor) { sendPacket(player, new WrapperPlayServerTeams("npc_team_" + entity.getEntityId(), WrapperPlayServerTeams.TeamMode.CREATE, new WrapperPlayServerTeams.ScoreBoardTeamInfo( - Component.empty(), Component.empty(), Component.empty(), + Component.text(" "), null, null, WrapperPlayServerTeams.NameTagVisibility.NEVER, WrapperPlayServerTeams.CollisionRule.NEVER, namedColor == null ? NamedTextColor.WHITE : NamedTextColor.NAMES.value(namedColor.name().toLowerCase()),