2015-01-25 01:11:02 +01:00
|
|
|
package com.intellectualcrafters.plot.titles;
|
|
|
|
|
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
|
2015-07-03 14:15:20 +02:00
|
|
|
import com.intellectualcrafters.plot.PS;
|
2015-01-25 01:11:02 +01:00
|
|
|
import com.intellectualcrafters.plot.config.Settings;
|
2015-05-14 12:34:08 +02:00
|
|
|
import com.intellectualcrafters.plot.object.BukkitPlayer;
|
|
|
|
import com.intellectualcrafters.plot.object.PlotPlayer;
|
2015-01-25 01:11:02 +01:00
|
|
|
|
|
|
|
public class HackTitle extends AbstractTitle {
|
2015-02-20 07:34:19 +01:00
|
|
|
@Override
|
2015-05-28 17:42:17 +02:00
|
|
|
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 {
|
2015-05-28 17:42:17 +02:00
|
|
|
final HackTitleManager title = new HackTitleManager(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-07-03 14:15:20 +02:00
|
|
|
PS.log("&cYour server version does not support titles!");
|
2015-02-20 07:34:19 +01:00
|
|
|
Settings.TITLES = false;
|
|
|
|
AbstractTitle.TITLE_CLASS = null;
|
|
|
|
}
|
|
|
|
}
|
2015-01-25 01:11:02 +01:00
|
|
|
}
|