You can change player tablist header and footer by creating ClientboundTabListPacket and sending it to player.
Example:
public static ClientboundTabListPacket tabListPacket = new ClientboundTabListPacket(MutableComponent.create(new LiteralContents("Its header")), MutableComponent.create(new LiteralContents("Its footer")));
@SubscribeEvent
public static void onLoggedInEvent(PlayerEvent.PlayerLoggedInEvent loggedInEvent) {
ServerPlayer serverPlayer = (ServerPlayer) loggedInEvent.getEntity();
serverPlayer.connection.send(tabListPacket);
}