How do I get the block title from the plugin implementing it?
If your block plugin derives from the BlockBase class, BlockBase::label() returns the default title for the block, but the block title is set in BlockBase::buildConfigurationForm().

  $form['label'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; $this-&gt;t('Title'),
    '#maxlength' =&gt; 255,
    '#default_value' =&gt; $this-&gt;label(),
    '#required' =&gt; TRUE,
  );
  $form['label_display'] = array(
    '#type' =&gt; 'checkbox',
    '#title' =&gt; $this-&gt;t('Display title'),
    '#default_value' =&gt; ($this-&gt;configuration['label_display'] === BlockInterface::BLOCK_LABEL_VISIBLE),
    '#return_value' =&gt; BlockInterface::BLOCK_LABEL_VISIBLE,
  );


So, your block class should check if $this-&gt;configuration['label_display'] is set to BlockInterface::BLOCK_LABEL_VISIBLE; if it is, then use $this-&gt;configuration['label'] for the title.

That said, I feel like the code you want to implement is actually not necessary, since the BlockBase class already takes care of showing the block title.