Fix Teleport issues

This commit is contained in:
Xephi 2014-06-13 18:17:23 +02:00
parent 6ad701c699
commit b403374c2a

View File

@ -133,22 +133,19 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
} }
if (!Settings.noTeleport) { if (!Settings.noTeleport) {
// Teleport the player // Teleport
if(Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) { if (Settings.isTeleportToSpawnEnabled && !Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
// If we have force the spawn location on join if (Settings.isSaveQuitLocationEnabled && auth.getQuitLocY() != 0) {
teleportToSpawn(); packQuitLocation();
} else {
if (Settings.isTeleportToSpawnEnabled) {
// If and only if teleport unauthed to spawn is activate
teleportBackFromSpawn();
} else { } else {
if (Settings.isSaveQuitLocationEnabled && auth.getQuitLocY() != 0) { teleportBackFromSpawn();
// Teleport the player on the saved location
packQuitLocation();
} else {
// Do not move the player from his position
}
} }
} else if (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())) {
teleportToSpawn();
} else if (Settings.isSaveQuitLocationEnabled && auth.getQuitLocY() != 0) {
packQuitLocation();
} else {
teleportBackFromSpawn();
} }
} }