mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-27 09:35:26 +02:00
Nothing is implemented, but it can compile and "run" on sponge now.
This commit is contained in:
@@ -6,11 +6,11 @@ import org.bukkit.ChatColor;
|
||||
public abstract class AbstractTitle {
|
||||
public static AbstractTitle TITLE_CLASS;
|
||||
|
||||
public static void sendTitle(PlotPlayer player, String head, String sub, ChatColor head_color, ChatColor sub_color) {
|
||||
public static void sendTitle(PlotPlayer player, String head, String sub) {
|
||||
if (TITLE_CLASS != null && !player.getAttribute("disabletitles")) {
|
||||
TITLE_CLASS.sendTitle(player, head, sub, head_color, sub_color, 1, 2, 1);
|
||||
TITLE_CLASS.sendTitle(player, head, sub, 1, 2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void sendTitle(PlotPlayer player, String head, String sub, ChatColor head_color, ChatColor sub_color, int in, int delay, int out);
|
||||
public abstract void sendTitle(PlotPlayer player, String head, String sub, int in, int delay, int out);
|
||||
}
|
||||
|
@@ -6,15 +6,13 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class DefaultTitle extends AbstractTitle {
|
||||
@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) {
|
||||
public void sendTitle(final PlotPlayer player, final String head, final String sub, int in, int delay, int out) {
|
||||
try {
|
||||
final DefaultTitleManager title = new DefaultTitleManager(head, sub, in, delay, out);
|
||||
title.setTitleColor(head_color);
|
||||
title.setSubtitleColor(sub_color);
|
||||
title.send(((BukkitPlayer) player).player);
|
||||
} catch (final Throwable e) {
|
||||
AbstractTitle.TITLE_CLASS = new DefaultTitle_183();
|
||||
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, head_color, sub_color, in, delay, out);
|
||||
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, in, delay, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,15 +6,13 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class DefaultTitle_183 extends AbstractTitle {
|
||||
@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) {
|
||||
public void sendTitle(final PlotPlayer player, final String head, final String sub, int in, int delay, int out) {
|
||||
try {
|
||||
final DefaultTitleManager_183 title = new DefaultTitleManager_183(head, sub, in, delay, out);
|
||||
title.setTitleColor(head_color);
|
||||
title.setSubtitleColor(sub_color);
|
||||
title.send(((BukkitPlayer) player).player);
|
||||
} catch (final Throwable e) {
|
||||
AbstractTitle.TITLE_CLASS = new HackTitle();
|
||||
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, head_color, sub_color, in, delay, out);
|
||||
AbstractTitle.TITLE_CLASS.sendTitle(player, head, sub, in, delay, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,11 +8,9 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class HackTitle extends AbstractTitle {
|
||||
@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) {
|
||||
public void sendTitle(final PlotPlayer player, final String head, final String sub, int in, int delay, int out) {
|
||||
try {
|
||||
final HackTitleManager title = new HackTitleManager(head, sub, in, delay, out);
|
||||
title.setTitleColor(head_color);
|
||||
title.setSubtitleColor(sub_color);
|
||||
title.send(((BukkitPlayer) player).player);
|
||||
} catch (final Throwable e) {
|
||||
PS.log("&cYour server version does not support titles!");
|
||||
|
Reference in New Issue
Block a user