fixed yet another bug with beds... argh it seems to be working fine now.

This commit is contained in:
NewGarbo 2015-11-18 21:02:39 +00:00
parent 6f3693f804
commit eded09b1a9
2 changed files with 6 additions and 4 deletions

View File

@ -710,7 +710,10 @@ public class UtilBlock
footBlock.setType(Material.BED_BLOCK);
footBlock.setRawData(dirFlag);
return pillowBlock.update(true, false) && footBlock.update(true, false);
pillowBlock.update(true, false);
footBlock.update(true, false);
return pillowBlock.getBlock().getType().equals(Material.BED_BLOCK) && footBlock.getBlock().getType().equals(Material.BED_BLOCK);
}
/**

View File

@ -886,7 +886,6 @@ public class ClansCommand extends CommandBase<ClansManager>
boolean bedPlaced = UtilBlock.placeBed(caller.getLocation(), EnumDirection.fromAngle(caller.getLocation().getYaw()), false, false);
// Check space
if (!bedPlaced)
{
UtilPlayer.message(caller, F.main("Clans", "This is not a suitable place for a bed."));
@ -925,8 +924,7 @@ public class ClansCommand extends CommandBase<ClansManager>
if (dir == null)
{
UtilPlayer.message(caller, F.main("Clans", "Error..."));
return;
UtilPlayer.message(caller, F.main("Clans", "Error whilst cleaning up old home bed!"));
}
Block headBlock = clan.getHome().clone().add(xModif, 0, zModif).getBlock();
@ -939,6 +937,7 @@ public class ClansCommand extends CommandBase<ClansManager>
{
// Shouldn't happen, but just in case:
System.out.println("Second block of " + clan.getName() + "'s Clan Home should be a bed, but isn't. [STRANGE!!!]");
UtilPlayer.message(caller, F.main("Clans", "Error whilst cleaning up old home bed!"));
}
}