Skip to content

Commit 74718be

Browse files
committed
Revert "moved compare to implementation"
This reverts commit baf68a6.
1 parent baf68a6 commit 74718be

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/org/spongepowered/api/MinecraftVersion.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,12 @@ public interface MinecraftVersion extends Comparable<MinecraftVersion> {
7373
*/
7474
OptionalInt dataVersion();
7575

76+
@Override
77+
default int compareTo(MinecraftVersion o) {
78+
final int result = Boolean.compare(this.isLegacy(), o.isLegacy());
79+
if (result != 0) {
80+
return result;
81+
}
82+
return this.protocolVersion() - o.protocolVersion();
83+
}
7684
}

0 commit comments

Comments
 (0)