Нужно чтобы после того как вписываешь Player выполнялся оператор if, что неправильно ?
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner databaseLogin = new Scanner(System.in);
Scanner databasePassword = new Scanner(System.in);
String name1 = "Login: ";
String name2 = "Player ";
String error = "error ";
String name3 = "Password: ";
////////////////////////////////////////////////////////////////
System.out.print("" + name1 );
System.out.println( "" + name1 + "" + databaseLogin.nextLine() );
if (databaseLogin.equals(" Player ")) {
System.out.print("" + name3 );
System.out.print(" Enter password: " + databasePassword.nextLine() );
} else {
System.out.println("" +error );
}
//////////////////////////////////////////////////////
if (databasePassword.equals(" 123qwe456 ")) {
System.out.println(" Welcome to the kingdom! ");
} else {
System.out.println("" + error );
}
}
}