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

@ -1616,14 +1616,14 @@ public class MainUtil {
*
* @return Home Location
*/
public static Location getPlotHome(final String w, final PlotId plotid) {
public static Location getPlotHome(final String w, final PlotId plotid) {
final Plot plot = getPlot(w, plotid).getBasePlot(false);
final BlockLoc home = plot.getPosition();
PS.get().getPlotManager(w);
if ((home == null) || ((home.x == 0) && (home.z == 0))) {
return getDefaultHome(plot);
} else {
Location bot = plot.getBottomAbs();
Location bot = plot.getBottomAbs();
final Location loc = new Location(bot.getWorld(), bot.getX() + home.x, bot.getY() + home.y, bot.getZ() + home.z, home.yaw, home.pitch);
if (BlockManager.manager.getBlock(loc).id != 0) {
loc.setY(Math.max(getHeighestBlock(w, loc.getX(), loc.getZ()), bot.getY()));

View File

@ -485,7 +485,6 @@ public abstract class SchematicHandler {
*/
public Schematic getSchematic(final File file) {
if (!file.exists()) {
PS.debug(file.toString() + " doesn't exist");
return null;
}
try {