diff options
Diffstat (limited to 'EssentialsSpawn/src/com/earth2me/essentials')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index 1ec1ffcaa..1531f4220 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -5,6 +5,7 @@ import com.earth2me.essentials.User; import com.earth2me.essentials.Util; import java.util.logging.Level; import java.util.logging.Logger; +import org.bukkit.Location; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerListener; import org.bukkit.event.player.PlayerRespawnEvent; @@ -21,7 +22,11 @@ public class EssentialsSpawnPlayerListener extends PlayerListener { if (Essentials.getStatic().getSettings().getRespawnAtHome()) { - event.setRespawnLocation(user.getHome()); + Location home = user.getHome(); + if (home == null) { + throw new Exception(); + } + event.setRespawnLocation(home); return; } } |