Made faction home respawning obey the 'worldsNoPowerLoss' config

This commit is contained in:
Oli 2011-06-29 14:45:51 +01:00
parent 69d1427552
commit 8ff84019ee

View File

@ -334,7 +334,7 @@ public class FactionsPlayerListener extends PlayerListener{
public void onPlayerRespawn(PlayerRespawnEvent event) {
FPlayer me = FPlayer.get(event.getPlayer());
Location home = me.getFaction().getHome();
if (Conf.homesEnabled && Conf.homesTeleportToOnDeath && home != null) {
if (Conf.homesEnabled && Conf.homesTeleportToOnDeath && home != null && !Conf.worldsNoPowerLoss.contains(event.getPlayer().getWorld().getName())) {
event.setRespawnLocation(home);
}
}