Remove 2 TODOs

This commit is contained in:
Norbi Peti 2020-03-04 10:45:26 +01:00
parent 6af2ad79a7
commit aad65e0222
2 changed files with 2 additions and 2 deletions

View file

@ -265,7 +265,7 @@ public class ChatProcessing {
System.out.println(message); System.out.println(message);
}; };
if (names.length > 0) //Add as first so it handles special characters (_) - TODO: But after URLs if (names.length > 0) //Add as first so it handles special characters (_) - though the order of the different types are defined
formatters.add(0, new StringMatchProvider("name", FormatSettings.builder().color(Color.Aqua) formatters.add(0, new StringMatchProvider("name", FormatSettings.builder().color(Color.Aqua)
.onmatch((match, builder, section) -> { .onmatch((match, builder, section) -> {
Player p = Bukkit.getPlayer(match); Player p = Bukkit.getPlayer(match);

View file

@ -260,7 +260,7 @@ public final class ChatFormatter {
private static void sortSections(ArrayList<FormattedSection> sections) { private static void sortSections(ArrayList<FormattedSection> sections) {
sections.sort( sections.sort(
(s1, s2) -> s1.Start == s2.Start (s1, s2) -> s1.Start == s2.Start
? s1.End == s2.End ? 0 : Integer.compare(s1.End, s2.End) //TODO: Test ? s1.End == s2.End ? 0 : Integer.compare(s1.End, s2.End)
: Integer.compare(s1.Start, s2.Start)); : Integer.compare(s1.Start, s2.Start));
} }