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

25 lines
984 B
Java
Raw Normal View History

2015-01-25 01:11:02 +01:00
package com.intellectualcrafters.plot.titles;
import org.bukkit.ChatColor;
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
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 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) {
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
}