Skip to content

Commit

Permalink
The offline hack
Browse files Browse the repository at this point in the history
  • Loading branch information
namtacs authored Apr 27, 2024
1 parent 11e0be0 commit ef81924
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,15 @@ public mcAccountSpinner(@NonNull Context context, @Nullable AttributeSet attrs)

/* Triggered when we need to perform mojang login */
private final ExtraListener<String[]> mMojangLoginListener = (key, value) -> {
if(value[1].isEmpty()){ // Test mode
MinecraftAccount account = new MinecraftAccount();
account.username = value[0];
try {
account.save();
}catch (IOException e){
Log.e("McAccountSpinner", "Failed to save the account : " + e);
}

mDoneListener.onLoginDone(account);
MinecraftAccount account = new MinecraftAccount();
account.username = value[0];
try {
account.save();
}catch (IOException e){
Log.e("McAccountSpinner", "Failed to save the account : " + e);
}

mDoneListener.onLoginDone(account);
return false;
};

Expand Down

0 comments on commit ef81924

Please sign in to comment.