geforkt von Mirrors/FastAsyncWorldEdit
Use Integer.compare() instead of if statements.
Dieser Commit ist enthalten in:
Ursprung
9ce4a415cb
Commit
8a5899459f
@ -31,13 +31,7 @@ public class TaskStateComparator implements Comparator<Task<?>> {
|
|||||||
public int compare(com.sk89q.worldedit.util.task.Task<?> o1, Task<?> o2) {
|
public int compare(com.sk89q.worldedit.util.task.Task<?> o1, Task<?> o2) {
|
||||||
int ordinal1 = o1.getState().ordinal();
|
int ordinal1 = o1.getState().ordinal();
|
||||||
int ordinal2 = o2.getState().ordinal();
|
int ordinal2 = o2.getState().ordinal();
|
||||||
if (ordinal1 < ordinal2) {
|
return Integer.compare(ordinal1, ordinal2);
|
||||||
return -1;
|
|
||||||
} else if (ordinal1 > ordinal2) {
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren