This commit is contained in:
Jesse Boyd 2016-06-18 13:13:36 +10:00
parent 232091454a
commit 91c742c141
4 changed files with 11 additions and 3 deletions

View File

@ -1318,6 +1318,10 @@ public class PlayerEvents extends PlotListener implements Listener {
return; return;
} }
if (checkEntity(entity, plot)) { if (checkEntity(entity, plot)) {
PlotPlayer owner = UUIDHandler.getPlayer(plot.owner);
if (owner != null) {
C.ENTITY_CAP.send(owner);
}
event.setCancelled(true); event.setCancelled(true);
} }
} }

View File

@ -316,6 +316,10 @@ public enum C {
POSITION_UNSET("$1Home position reset to the default location", "Position"), POSITION_UNSET("$1Home position reset to the default location", "Position"),
HOME_ARGUMENT("$2Use /plot set home [none]", "Position"), HOME_ARGUMENT("$2Use /plot set home [none]", "Position"),
INVALID_POSITION("$2That is not a valid position value", "Position"), INVALID_POSITION("$2That is not a valid position value", "Position"),
/*
* Cap
*/
ENTITY_CAP("$2You are not allowed to spawn more mobs", "cap"),
/* /*
* Time * Time
*/ */

View File

@ -21,7 +21,7 @@ public abstract class LocalBlockQueue {
public ScopedLocalBlockQueue getForChunk(int x, int z) { public ScopedLocalBlockQueue getForChunk(int x, int z) {
int bx = x << 4; int bx = x << 4;
int bz = z << 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(); public abstract boolean next();

View File

@ -42,8 +42,8 @@ public class ScopedLocalBlockQueue extends DelegateLocalBlockQueue {
} }
public void fillBiome(String biome) { public void fillBiome(String biome) {
for (int x = minX; x <= maxX; x++) { for (int x = 0; x <= dx; x++) {
for (int z = minZ; z < maxZ; z++) { for (int z = 0; z < dz; z++) {
setBiome(x, z, biome); setBiome(x, z, biome);
} }
} }