Renamed Utils.java to PacketUtils.java

This commit is contained in:
2025-04-11 14:18:38 +02:00
parent c7722115ed
commit 0941d3929e
3 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,15 @@
package wtf.hak.survivalfabric.utils;
import net.minecraft.network.packet.s2c.play.PlayerListS2CPacket;
import net.minecraft.server.network.ServerPlayerEntity;
import java.util.Objects;
public class PacketUtils {
public static void updateListNames(ServerPlayerEntity p) {
for(ServerPlayerEntity sp : Objects.requireNonNull(p.getServer()).getPlayerManager().getPlayerList()) {
sp.networkHandler.sendPacket(new PlayerListS2CPacket(PlayerListS2CPacket.Action.UPDATE_DISPLAY_NAME, p));
}
}
}