PlotSquared/PlotSquared/src/main/java/com/intellectualcrafters/plot/titles/DefaultTitle.java

20 lines
748 B
Java
Raw Normal View History

2015-01-18 21:11:51 +01:00
package com.intellectualcrafters.plot.titles;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
public class DefaultTitle extends AbstractTitle {
2015-02-20 07:34:19 +01:00
@Override
public void sendTitle(final Player player, final String head, final String sub, final ChatColor head_color, final ChatColor sub_color) {
try {
final DefaultTitleManager title = new DefaultTitleManager(head, sub, 1, 2, 1);
title.setTitleColor(head_color);
title.setSubtitleColor(sub_color);
title.send(player);
} catch (final Throwable e) {
AbstractTitle.TITLE_CLASS = new HackTitle();
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, head_color, sub_color);
}
}
2015-01-18 21:11:51 +01:00
}