cleanup: replace anonymous inner class with lambda

This commit is contained in:
P0nk
2021-04-07 23:45:16 +02:00
parent 2d143d0afd
commit 6253169e35
65 changed files with 1204 additions and 2234 deletions

View File

@@ -451,12 +451,7 @@ public final class PlayerLoggedinHandler extends AbstractMaplePacketHandler {
timedBuffs.add(new Pair<>(curtime - pb.usedTime, pb));
}
Collections.sort(timedBuffs, new Comparator<Pair<Long, PlayerBuffValueHolder>>() {
@Override
public int compare(Pair<Long, PlayerBuffValueHolder> p1, Pair<Long, PlayerBuffValueHolder> p2) {
return p1.getLeft().compareTo(p2.getLeft());
}
});
Collections.sort(timedBuffs, (p1, p2) -> p1.getLeft().compareTo(p2.getLeft()));
return timedBuffs;
}