Fix sethome/home for mega plots
Minor tweaks
This commit is contained in:
Jesse Boyd
2015-12-16 16:38:53 +11:00
parent dd4a1faede
commit c32cfc62fa
10 changed files with 34 additions and 26 deletions

View File

@ -817,16 +817,17 @@ public class Plot {
* Set the home location
* @param loc
*/
public void setHome(final BlockLoc loc) {
public void setHome(BlockLoc loc) {
final BlockLoc pos = getSettings().getPosition();
if (((pos == null || pos.equals(new BlockLoc(0, 0, 0))) && (loc == null)) || ((pos != null) && pos.equals(loc))) {
return;
}
getSettings().setPosition(loc);
if (getSettings().getPosition() == null) {
DBFunc.setPosition(this, "");
Plot plot = getBasePlot(false);
plot.getSettings().setPosition(loc);
if (plot.getSettings().getPosition() == null) {
DBFunc.setPosition(plot, "");
} else {
DBFunc.setPosition(this, getSettings().getPosition().toString());
DBFunc.setPosition(plot, getSettings().getPosition().toString());
}
}