mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-28 12:07:35 +01:00
Fixed sorting error using Users
This commit is contained in:
parent
44c52668c2
commit
2c9545a029
@ -28,7 +28,7 @@ import java.util.UUID;
|
||||
*
|
||||
* @author Rsl1122
|
||||
*/
|
||||
public class User {
|
||||
public class User implements Comparable<User> {
|
||||
|
||||
private final String username;
|
||||
private final String linkedTo;
|
||||
@ -109,4 +109,9 @@ public class User {
|
||||
public int hashCode() {
|
||||
return Objects.hash(username, linkedTo, linkedToUUID, passwordHash, permissionLevel, permissions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(User o) {
|
||||
return Integer.compare(o.permissionLevel, this.permissionLevel);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user