'Display the plugin_stats on the screen.
If display_optional=True display the optional stats
If display_additional=True display additionnal stats
max_y do not display line > max_y'

def display_plugin(self, plugin_stats, display_optional=True, display_additional=True, max_y=65535, add_space=True):

    if ((plugin_stats is None) or (not plugin_stats['msgdict']) or (not plugin_stats['display'])):
        return 0
    screen_x = self.screen.getmaxyx()[1]
    screen_y = self.screen.getmaxyx()[0]
    if (plugin_stats['align'] == 'right'):
        display_x = (screen_x - self.get_stats_display_width(plugin_stats))
    else:
        display_x = self.column
    if (plugin_stats['align'] == 'bottom'):
        display_y = (screen_y - self.get_stats_display_height(plugin_stats))
    else:
        display_y = self.line
    x = display_x
    x_max = x
    y = display_y
    for m in plugin_stats['msgdict']:
        if m['msg'].startswith('\n'):
            y += 1
            x = display_x
            continue
        if (x < 0):
            continue
        if ((not m['splittable']) and ((x + len(m['msg'])) > screen_x)):
            continue
        if ((y < 0) or ((y + 1) > screen_y) or (y > max_y)):
            break
        if ((not display_optional) and m['optional']):
            continue
        if ((not display_additional) and m['additional']):
            continue
        try:
            self.term_window.addnstr(y, x, m['msg'], (screen_x - x), self.colors_list[m['decoration']])
        except Exception:
            pass
        else:
            try:
                x += len(u(m['msg']))
            except UnicodeDecodeError:
                pass
            if (x > x_max):
                x_max = x
    self.next_column = max(self.next_column, (x_max + self.space_between_column))
    self.next_line = max(self.next_line, (y + self.space_between_line))
    if ((not add_space) and (self.next_line > 0)):
        self.next_line -= 1
