Remove google Joiner

This commit is contained in:
filoghost 2014-12-21 15:02:53 +01:00
parent 1ce275ace6
commit 2e1e184bb4
3 changed files with 10 additions and 6 deletions

View File

@ -3,8 +3,6 @@ package com.gmail.filoghost.holographicdisplays.commands.main.subs;
import java.util.Arrays;
import java.util.List;
import net.minecraft.util.com.google.common.base.Joiner;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -64,7 +62,7 @@ public class EditCommand extends HologramSubCommand {
HolographicDisplays.getNMSManager().newFancyMessage(usage)
.color(ChatColor.AQUA)
.suggest(usage)
.tooltip(Joiner.on('\n').join(help))
.tooltip(Utils.join(help, "\n"))
.send((Player) sender);
} else {
sender.sendMessage(Colors.PRIMARY + usage);

View File

@ -2,8 +2,6 @@ package com.gmail.filoghost.holographicdisplays.commands.main.subs;
import java.util.List;
import net.minecraft.util.com.google.common.base.Joiner;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@ -57,7 +55,7 @@ public class HelpCommand extends HologramSubCommand {
HolographicDisplays.getNMSManager().newFancyMessage(usage)
.color(ChatColor.AQUA)
.suggest(usage)
.tooltip(Joiner.on('\n').join(help))
.tooltip(Utils.join(help, "\n"))
.send((Player) sender);
} else {

View File

@ -94,5 +94,13 @@ public class Utils extends Object {
return result.toString();
}
public static String join(List<String> elements, String separator, int startIndex, int size) {
return join(elements.toArray(new String[elements.size()]), separator, startIndex, size);
}
public static String join(List<String> elements, String separator) {
return join(elements, separator, 0, elements.size());
}
}