Nothing is implemented, but it can compile and "run" on sponge now.

This commit is contained in:
boy0001
2015-07-28 21:38:49 +10:00
parent 904b75a7cd
commit 89e3bd97f0
35 changed files with 915 additions and 253 deletions

View File

@@ -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);
}

View File

@@ -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);
}
}
}

View File

@@ -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);
}
}
}

View File

@@ -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!");