mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
prevent NoSuchElementException on PlayerCollection.java
This commit is contained in:
@@ -47,6 +47,7 @@ public class PlayerCollection extends FCollection<Player> {
|
||||
|
||||
// sort functions with Comparator
|
||||
public Player min(Comparator<Player> comp) {
|
||||
if (this.isEmpty()) return null;
|
||||
return Collections.min(this, comp);
|
||||
}
|
||||
public Player max(Comparator<Player> comp) {
|
||||
|
||||
Reference in New Issue
Block a user