package tc.oc.commons.bukkit.chat;

import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.entity.Player;
import tc.oc.commons.core.chat.Component;
import tc.oc.commons.core.chat.Components;

public class LegacyPlayerAudience extends PlayerAudience {

    private BaseComponent recentHotbarMessage;

    public LegacyPlayerAudience(Player player) {
        super(player);
    }

    @Override
    public void sendHotbarMessage(BaseComponent message) {
        // Do not spam hot bar messages, as the protocol converts
        // them to regular chat messages.
        if(!Components.equals(message, recentHotbarMessage)) {
            super.sendHotbarMessage(message);
            recentHotbarMessage = message;
        }
    }

    @Override
    public void showTitle(BaseComponent title, BaseComponent subtitle, int inTicks, int stayTicks, int outTicks) {
        super.sendMessage(new Component(title).extra(" ").extra(subtitle));
    }
}

@@ -141,32 +141,33 @@
 e.chat.Component
+s
 ;%0Aimport tc.oc.c
@@ -178,31 +178,66 @@
 ns.core.
-chat.Components
+stream.Collectors;%0A%0Aimport java.util.stream.Stream
 ;%0A%0Apubli
@@ -678,30 +678,16 @@
     
-super.sendHotbarMessag
+emphasiz
 e(me
@@ -895,72 +895,318 @@
     
-super.sendMessage(new Component(title).extra(%22 %22).extra(subtitle
+emphasize(Components.join(Components.space(), Stream.of(title, subtitle).filter(msg -%3E msg != null).collect(Collectors.toImmutableList())));%0A    %7D%0A%0A    protected void emphasize(BaseComponent message) %7B%0A        sendMessage(Components.blank());%0A        sendMessage(message);%0A        sendMessage(Components.blank(
 ));%0A
@@ -1211,10 +1211,11 @@
 ;%0A    %7D%0A
+%0A
 %7D%0A

Make titles and hotbars more visible