Fixed randomSpawnFlags getting.

This commit is contained in:
Jos van 't Hof
2012-04-06 22:33:02 +02:00
parent ac380155de
commit 0c4f4afe6c

View File

@@ -34,14 +34,14 @@ public class RespawnListener implements Listener{
World world = player.getWorld();
String worldName = world.getName();
List<String> randomSpawnFlags = plugin.yamlHandler.worlds.getStringList(worldName + ".usebeds");
List<String> randomSpawnFlags = plugin.yamlHandler.worlds.getStringList(worldName + ".randomspawnon");
if (event.isBedSpawn() && !randomSpawnFlags.contains("bedrespawn")){ // checks if player should be spawned at his bed
plugin.logDebug(playerName + " is spawned at his bed!");
return;
}
if (plugin.yamlHandler.worlds.getBoolean(worldName + ".keepspawns", false) &&
if (plugin.yamlHandler.worlds.getBoolean(worldName + ".keeprandomspawns", false) &&
player.hasMetadata(player.getWorld().getName() + ".spawn")){
event.setRespawnLocation(plugin.getPlayerSpawn(player, world));
plugin.logDebug(playerName + " is spawned at his saved spawn.");