mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 06:14:45 +01:00
Fix account creation
This commit is contained in:
@@ -8,7 +8,7 @@ import emu.lunarcore.LunarRail;
|
||||
public class AccountHelper {
|
||||
|
||||
public static boolean createAccount(String username, String password, int reservedUid) {
|
||||
Account account = LunarRail.getAccountDatabase().getObjectByField(Account.class, "name", username);
|
||||
Account account = LunarRail.getAccountDatabase().getObjectByField(Account.class, "username", username);
|
||||
|
||||
if (account != null) {
|
||||
return false;
|
||||
@@ -22,7 +22,7 @@ public class AccountHelper {
|
||||
}
|
||||
|
||||
public static boolean deleteAccount(String username) {
|
||||
Account account = LunarRail.getAccountDatabase().getObjectByField(Account.class, "name", username);
|
||||
Account account = LunarRail.getAccountDatabase().getObjectByField(Account.class, "username", username);
|
||||
|
||||
if (account == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user