mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 14:33:08 +00:00
fixes
This commit is contained in:
parent
7f4037e1ed
commit
4c8adcda68
9 changed files with 44 additions and 14 deletions
|
@ -946,16 +946,17 @@ import com.intellectualcrafters.plot.object.PlotWorld;
|
|||
Plot plot = getPlot(w, plotid);
|
||||
BlockLoc home = plot.settings.getPosition();
|
||||
final Location bot = getPlotBottomLoc(w, plotid);
|
||||
PlotManager manager = PlotMain.getPlotManager(w);
|
||||
if (home == null || (home.x == 0 && home.z == 0)) {
|
||||
final Location top = getPlotTopLoc(w, plotid);
|
||||
final int x = top.getBlockX() - bot.getBlockX();
|
||||
final int z = top.getBlockZ() - bot.getBlockZ();
|
||||
final int y = getHeighestBlock(w, x, z);
|
||||
final int y = Math.max(getHeighestBlock(w, x, z), manager.getSignLoc(w, PlotMain.getWorldSettings(w), plot).getBlockY());
|
||||
return new Location(w, bot.getBlockX() + (x / 2), y, bot.getBlockZ() + (z / 2));
|
||||
}
|
||||
else {
|
||||
final int y = getHeighestBlock(w, home.x, home.z);
|
||||
return bot.add(home.x, home.y + y, home.z);
|
||||
final int y = Math.max(getHeighestBlock(w, home.x, home.z), home.y);
|
||||
return bot.add(home.x, y, home.z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue