Minor - adjust PlayerAuth builder methods
- Rename hash() to password() - Add location(Location) builder method - Replace usages of password(new EncryptedPassword(hash, salt)) to the more terse password(String, String) builder method
This commit is contained in:
@@ -146,7 +146,7 @@ public class AsynchronousLogin {
|
||||
.ip(getIP())
|
||||
.lastLogin(new Date().getTime())
|
||||
.email(email)
|
||||
.hash(pAuth.getPassword())
|
||||
.password(pAuth.getPassword())
|
||||
.build();
|
||||
database.updateSession(auth);
|
||||
|
||||
|
||||
@@ -101,12 +101,9 @@ public class AsyncRegister {
|
||||
PlayerAuth auth = PlayerAuth.builder()
|
||||
.name(name)
|
||||
.realName(player.getName())
|
||||
.hash(encryptedPassword)
|
||||
.password(encryptedPassword)
|
||||
.ip(ip)
|
||||
.locWorld(player.getLocation().getWorld().getName())
|
||||
.locX(player.getLocation().getX())
|
||||
.locY(player.getLocation().getY())
|
||||
.locZ(player.getLocation().getZ())
|
||||
.location(player.getLocation())
|
||||
.email(email)
|
||||
.build();
|
||||
|
||||
@@ -127,12 +124,9 @@ public class AsyncRegister {
|
||||
PlayerAuth auth = PlayerAuth.builder()
|
||||
.name(name)
|
||||
.realName(player.getName())
|
||||
.hash(encryptedPassword)
|
||||
.password(encryptedPassword)
|
||||
.ip(ip)
|
||||
.locWorld(player.getLocation().getWorld().getName())
|
||||
.locX(player.getLocation().getX())
|
||||
.locY(player.getLocation().getY())
|
||||
.locZ(player.getLocation().getZ())
|
||||
.location(player.getLocation())
|
||||
.build();
|
||||
|
||||
if (!database.saveAuth(auth)) {
|
||||
|
||||
Reference in New Issue
Block a user