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

22 lines
916 B
Java
Raw Normal View History

2015-01-18 21:11:51 +01:00
package com.intellectualcrafters.plot.titles;
import org.bukkit.ChatColor;
2015-05-14 12:34:08 +02:00
import com.intellectualcrafters.plot.object.BukkitPlayer;
import com.intellectualcrafters.plot.object.PlotPlayer;
2015-01-18 21:11:51 +01:00
public class DefaultTitle extends AbstractTitle {
2015-02-20 07:34:19 +01:00
@Override
public void sendTitle(final PlotPlayer player, final String head, final String sub, final ChatColor head_color, final ChatColor sub_color, int in, int delay, int out) {
2015-02-20 07:34:19 +01:00
try {
final DefaultTitleManager title = new DefaultTitleManager(head, sub, in, delay, out);
2015-02-20 07:34:19 +01:00
title.setTitleColor(head_color);
title.setSubtitleColor(sub_color);
2015-05-14 12:34:08 +02:00
title.send(((BukkitPlayer) player).player);
2015-02-20 07:34:19 +01:00
} catch (final Throwable e) {
2015-03-12 04:15:17 +01:00
AbstractTitle.TITLE_CLASS = new DefaultTitle_183();
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, head_color, sub_color, in, delay, out);
2015-02-20 07:34:19 +01:00
}
}
2015-01-18 21:11:51 +01:00
}