Fix #57
This commit is contained in:
parent
4d65dd2a3a
commit
b40df54c9a
@ -274,6 +274,7 @@ public class AsynchronousLogin implements AsynchronousProcess {
|
|||||||
auth.setRealName(player.getName());
|
auth.setRealName(player.getName());
|
||||||
auth.setLastLogin(System.currentTimeMillis());
|
auth.setLastLogin(System.currentTimeMillis());
|
||||||
auth.setLastIp(ip);
|
auth.setLastIp(ip);
|
||||||
|
auth.setQuitLocation(player.getLocation());
|
||||||
dataSource.updateSession(auth);
|
dataSource.updateSession(auth);
|
||||||
|
|
||||||
// TODO: send an update when a messaging service will be implemented (SESSION)
|
// TODO: send an update when a messaging service will be implemented (SESSION)
|
||||||
|
|||||||
@ -142,8 +142,9 @@ public class TeleportationService implements Reloadable {
|
|||||||
logger.debug("Teleporting `{0}` to spawn because of 'force-spawn after login'", player.getName());
|
logger.debug("Teleporting `{0}` to spawn because of 'force-spawn after login'", player.getName());
|
||||||
teleportToSpawn(player, true);
|
teleportToSpawn(player, true);
|
||||||
} else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) {
|
} else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) {
|
||||||
if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION) && auth.getQuitLocY() != 0) {
|
if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
|
||||||
Location location = buildLocationFromAuth(player, auth);
|
Location location = buildLocationFromAuth(player, auth);
|
||||||
|
if (location.equals(player.getLocation())) return;
|
||||||
logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName());
|
logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName());
|
||||||
teleportBackFromSpawn(player, location);
|
teleportBackFromSpawn(player, location);
|
||||||
} else if (limbo != null && limbo.getLocation() != null) {
|
} else if (limbo != null && limbo.getLocation() != null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user