diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 9fbc6f7bf..ec553699a 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1318,6 +1318,10 @@ public class PlayerEvents extends PlotListener implements Listener { return; } if (checkEntity(entity, plot)) { + PlotPlayer owner = UUIDHandler.getPlayer(plot.owner); + if (owner != null) { + C.ENTITY_CAP.send(owner); + } event.setCancelled(true); } } diff --git a/Core/src/main/java/com/intellectualcrafters/plot/config/C.java b/Core/src/main/java/com/intellectualcrafters/plot/config/C.java index baa45a904..afde41add 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -316,6 +316,10 @@ public enum C { POSITION_UNSET("$1Home position reset to the default location", "Position"), HOME_ARGUMENT("$2Use /plot set home [none]", "Position"), INVALID_POSITION("$2That is not a valid position value", "Position"), + /* + * Cap + */ + ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"), /* * Time */ diff --git a/Core/src/main/java/com/intellectualcrafters/plot/util/block/LocalBlockQueue.java b/Core/src/main/java/com/intellectualcrafters/plot/util/block/LocalBlockQueue.java index 96fd8811f..ff02a4279 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/util/block/LocalBlockQueue.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/util/block/LocalBlockQueue.java @@ -21,7 +21,7 @@ public abstract class LocalBlockQueue { public ScopedLocalBlockQueue getForChunk(int x, int z) { int bx = x << 4; int bz = z << 4; - ScopedLocalBlockQueue scoped = new ScopedLocalBlockQueue(this, new Location(getWorld(), bx, 0, bz), new Location(getWorld(), bx + 15, 255, bz + 15)); + return new ScopedLocalBlockQueue(this, new Location(getWorld(), bx, 0, bz), new Location(getWorld(), bx + 15, 255, bz + 15)); } public abstract boolean next(); diff --git a/Core/src/main/java/com/intellectualcrafters/plot/util/block/ScopedLocalBlockQueue.java b/Core/src/main/java/com/intellectualcrafters/plot/util/block/ScopedLocalBlockQueue.java index 745e810cb..e2d35a470 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/util/block/ScopedLocalBlockQueue.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/util/block/ScopedLocalBlockQueue.java @@ -42,8 +42,8 @@ public class ScopedLocalBlockQueue extends DelegateLocalBlockQueue { } public void fillBiome(String biome) { - for (int x = minX; x <= maxX; x++) { - for (int z = minZ; z < maxZ; z++) { + for (int x = 0; x <= dx; x++) { + for (int z = 0; z < dz; z++) { setBiome(x, z, biome); } }