Fix a bug with teleporting to signs

If no signs are connected to the region it will now correctly teleport
to the location set by '/as settp' instead of always using the default
location.
This commit is contained in:
Thijs Wiefferink 2015-01-26 12:31:50 +01:00
parent 22d214e59d
commit fb51da84ae

View File

@ -1284,9 +1284,9 @@ public abstract class GeneralRegion {
startLocation = signs.get(0).subtract(0.0, 1.0, 0.0);
startLocation.setPitch(player.getLocation().getPitch());
startLocation.setYaw(player.getLocation().getYaw());
}
} else if(this.hasTeleportLocation()) {
}
}
if(startLocation == null && this.hasTeleportLocation()) {
startLocation = getTeleportLocation();
}
// Set default startLocation if not set