Skip to content

Commit

Permalink
Use the System function.
Browse files Browse the repository at this point in the history
  • Loading branch information
thejudge156 authored Sep 18, 2024
1 parent 8c15489 commit 353ab2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/pojlib/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ public static void login(Activity activity)
}

MinecraftAccount acc = MinecraftAccount.load(activity.getFilesDir() + "/accounts", null, null);
if(acc != null && (acc.expiresIn > new Date().getTime() || !hasWifi)) {
if(acc != null && (acc.expiresIn > System.currentTimeMillis() || !hasWifi)) {
currentAcc = acc;
API.profileImage = MinecraftAccount.getSkinFaceUrl(API.currentAcc);
API.profileName = API.currentAcc.username;
return;
} else if(acc != null && acc.expiresIn <= new Date().getTime()) {
} else if(acc != null && acc.expiresIn <= System.currentTimeMillis()) {
currentAcc = LoginHelper.getNewToken(activity);
if(currentAcc == null) {
LoginHelper.beginLogin(activity);
Expand Down

0 comments on commit 353ab2f

Please sign in to comment.