mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 11:44:42 +02:00
Fixes #577
This commit is contained in:
@ -718,7 +718,7 @@ public class Plot {
|
||||
* Get the biome (String)
|
||||
*/
|
||||
public String getBiome() {
|
||||
final Location loc = getBottom().add(1, 0, 1);
|
||||
final Location loc = getBottom();
|
||||
return BlockManager.manager.getBiome(loc.getWorld(), loc.getX(), loc.getZ());
|
||||
}
|
||||
|
||||
@ -735,7 +735,7 @@ public class Plot {
|
||||
* @return
|
||||
*/
|
||||
public Location getBottom() {
|
||||
return MainUtil.getPlotBottomLoc(world, id);
|
||||
return MainUtil.getPlotBottomLoc(world, id).add(1, 0, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,6 +61,7 @@ public abstract class PlotWorld {
|
||||
public final static boolean WORLD_BORDER_DEFAULT = false;
|
||||
public final static int MAX_PLOT_MEMBERS_DEFAULT = 128;
|
||||
public final static int MAX_BUILD_HEIGHT_DEFAULT = 256;
|
||||
public final static int MIN_BUILD_HEIGHT_DEFAULT = 1;
|
||||
public final static PlotGamemode GAMEMODE_DEFAULT = PlotGamemode.CREATIVE;
|
||||
// are plot clusters enabled
|
||||
// require claim in cluster
|
||||
@ -97,6 +98,7 @@ public abstract class PlotWorld {
|
||||
public boolean HOME_ALLOW_NONMEMBER;
|
||||
public PlotLoc DEFAULT_HOME;
|
||||
public int MAX_BUILD_HEIGHT;
|
||||
public int MIN_BUILD_HEIGHT;
|
||||
public PlotGamemode GAMEMODE = PlotGamemode.CREATIVE;
|
||||
|
||||
public PlotWorld(final String worldname) {
|
||||
@ -154,6 +156,7 @@ public abstract class PlotWorld {
|
||||
this.PLOT_CHAT = config.getBoolean("chat.enabled");
|
||||
this.WORLD_BORDER = config.getBoolean("world.border");
|
||||
this.MAX_BUILD_HEIGHT = config.getInt("world.max_height");
|
||||
this.MIN_BUILD_HEIGHT = config.getInt("min.max_height");
|
||||
|
||||
switch (config.getString("world.gamemode").toLowerCase()) {
|
||||
case "survival":
|
||||
@ -260,6 +263,7 @@ public abstract class PlotWorld {
|
||||
options.put("home.default", "side");
|
||||
options.put("home.allow-nonmembers", false);
|
||||
options.put("world.max_height", PlotWorld.MAX_BUILD_HEIGHT_DEFAULT);
|
||||
options.put("world.min_height", PlotWorld.MIN_BUILD_HEIGHT_DEFAULT);
|
||||
options.put("world.gamemode", PlotWorld.GAMEMODE_DEFAULT.name().toLowerCase());
|
||||
|
||||
if (Settings.ENABLE_CLUSTERS && (this.TYPE != 0)) {
|
||||
|
@ -3,6 +3,8 @@ package com.intellectualcrafters.plot.object;
|
||||
public class RegionWrapper {
|
||||
public final int minX;
|
||||
public final int maxX;
|
||||
public final int minY;
|
||||
public final int maxY;
|
||||
public final int minZ;
|
||||
public final int maxZ;
|
||||
|
||||
@ -11,6 +13,21 @@ public class RegionWrapper {
|
||||
this.minX = minX;
|
||||
this.maxZ = maxZ;
|
||||
this.minZ = minZ;
|
||||
this.minY = 0;
|
||||
this.maxY = 256;
|
||||
}
|
||||
|
||||
public RegionWrapper(final int minX, final int maxX, final int minY, final int maxY, final int minZ, final int maxZ) {
|
||||
this.maxX = maxX;
|
||||
this.minX = minX;
|
||||
this.maxZ = maxZ;
|
||||
this.minZ = minZ;
|
||||
this.minY = minY;
|
||||
this.maxY = maxY;
|
||||
}
|
||||
|
||||
public boolean isIn(final int x, final int y, final int z) {
|
||||
return ((x >= this.minX) && (x <= this.maxX) && (z >= this.minZ) && (z <= this.maxZ) && (y >= this.minY) && (y <= this.maxY));
|
||||
}
|
||||
|
||||
public boolean isIn(final int x, final int z) {
|
||||
|
Reference in New Issue
Block a user