mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fixes #293
This commit is contained in:
parent
e24d0c5356
commit
f1a7e0d73f
@ -8,7 +8,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>2.10.1</version>
|
<version>2.10.2</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -53,7 +53,6 @@ public class BukkitCommand implements CommandExecutor, TabCompleter {
|
|||||||
}
|
}
|
||||||
String best = new StringComparison(strings[0], commands).getBestMatch();
|
String best = new StringComparison(strings[0], commands).getBestMatch();
|
||||||
tabOptions.add(best);
|
tabOptions.add(best);
|
||||||
System.out.print("TAB OPTIONS");
|
|
||||||
final String arg = strings[0].toLowerCase();
|
final String arg = strings[0].toLowerCase();
|
||||||
for (final SubCommand cmd : MainCommand.subCommands) {
|
for (final SubCommand cmd : MainCommand.subCommands) {
|
||||||
if (!cmd.cmd.equalsIgnoreCase(best)) {
|
if (!cmd.cmd.equalsIgnoreCase(best)) {
|
||||||
|
@ -202,16 +202,7 @@ public class AugmentedPopulator extends BlockPopulator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.o) {
|
if (this.o) {
|
||||||
chunk.load(true);
|
|
||||||
populateBlocks(world, rand, X, Z, x, z, check);
|
populateBlocks(world, rand, X, Z, x, z, check);
|
||||||
TaskManager.runTaskLater(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
// Don't need to populate biome with this
|
|
||||||
// populateBiome(world, x, z);
|
|
||||||
MainUtil.update(world.getName(), new ChunkLoc(chunk.getX(), chunk.getZ()));
|
|
||||||
}
|
|
||||||
}, 20);
|
|
||||||
} else {
|
} else {
|
||||||
TaskManager.runTaskLater(new Runnable() {
|
TaskManager.runTaskLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -224,7 +215,6 @@ public class AugmentedPopulator extends BlockPopulator {
|
|||||||
public void run() {
|
public void run() {
|
||||||
chunk.load(true);
|
chunk.load(true);
|
||||||
populateBlocks(world, rand, X, Z, x, z, check);
|
populateBlocks(world, rand, X, Z, x, z, check);
|
||||||
MainUtil.update(world.getName(), new ChunkLoc(chunk.getX(), chunk.getZ()));
|
|
||||||
}
|
}
|
||||||
}, 40 + rand.nextInt(40));
|
}, 40 + rand.nextInt(40));
|
||||||
}
|
}
|
||||||
@ -252,7 +242,7 @@ public class AugmentedPopulator extends BlockPopulator {
|
|||||||
short id = result[i][j];
|
short id = result[i][j];
|
||||||
final int xx = x + x1;
|
final int xx = x + x1;
|
||||||
final int zz = z + z1;
|
final int zz = z + z1;
|
||||||
if (check && (((z + z1) < this.bz) || ((z + z1) > this.tz) || ((x + x1) < this.bx) || ((x + x1) > this.tx))) {
|
if (check && (((zz) < this.bz) || ((zz) > this.tz) || ((xx) < this.bx) || ((xx) > this.tx))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (this.p) {
|
if (this.p) {
|
||||||
@ -267,6 +257,30 @@ public class AugmentedPopulator extends BlockPopulator {
|
|||||||
BukkitSetBlockManager.setBlockManager.set(world, xx, y, zz, id, (byte) 0);
|
BukkitSetBlockManager.setBlockManager.set(world, xx, y, zz, id, (byte) 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
short y_min = y_loc[i][0];
|
||||||
|
if (y_min < 128) {
|
||||||
|
for (int x1 = x; x1 < x + 16; x1++) {
|
||||||
|
for (int z1 = z; z1 < z + 16; z1++) {
|
||||||
|
if (check && (((z1) < this.bz) || ((z1) > this.tz) || ((x1) < this.bx) || ((x1) > this.tx))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (this.p) {
|
||||||
|
if (ChunkManager.CURRENT_PLOT_CLEAR != null) {
|
||||||
|
if (BukkitChunkManager.isIn(ChunkManager.CURRENT_PLOT_CLEAR, x1, z1)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else if (this.manager.getPlotIdAbs(this.plotworld, x1, 0, z1) != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int y = y_min; y < y_min + 16; y++) {
|
||||||
|
BukkitSetBlockManager.setBlockManager.set(world, x1, y, z1, 0, (byte) 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (final BlockPopulator populator : this.generator.getDefaultPopulators(world)) {
|
for (final BlockPopulator populator : this.generator.getDefaultPopulators(world)) {
|
||||||
Chunk chunk = world.getChunkAt(X, Z);
|
Chunk chunk = world.getChunkAt(X, Z);
|
||||||
|
@ -830,12 +830,10 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
|||||||
}
|
}
|
||||||
final PlotWorld pW = PlotSquared.getPlotWorld(world);
|
final PlotWorld pW = PlotSquared.getPlotWorld(world);
|
||||||
final CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
|
final CreatureSpawnEvent.SpawnReason reason = event.getSpawnReason();
|
||||||
System.out.print("REASON: " + reason);
|
|
||||||
if ((reason == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG || reason == CreatureSpawnEvent.SpawnReason.DISPENSE_EGG) && !pW.SPAWN_EGGS) {
|
if ((reason == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG || reason == CreatureSpawnEvent.SpawnReason.DISPENSE_EGG) && !pW.SPAWN_EGGS) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
} else if ((reason == CreatureSpawnEvent.SpawnReason.BREEDING) && !pW.SPAWN_BREEDING) {
|
} else if ((reason == CreatureSpawnEvent.SpawnReason.BREEDING) && !pW.SPAWN_BREEDING) {
|
||||||
System.out.print("CANCELLED: " + pW.SPAWN_BREEDING);
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
} else if ((reason == CreatureSpawnEvent.SpawnReason.CUSTOM) && !pW.SPAWN_CUSTOM && !(event.getEntityType().getTypeId() == 30)) {
|
} else if ((reason == CreatureSpawnEvent.SpawnReason.CUSTOM) && !pW.SPAWN_CUSTOM && !(event.getEntityType().getTypeId() == 30)) {
|
||||||
|
@ -138,8 +138,6 @@ public class UUIDHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
|
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
|
||||||
System.out.print(System.currentTimeMillis() - start);
|
|
||||||
System.out.print(Settings.TWIN_MODE_UUID);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,8 +211,6 @@ public class UUIDHandler {
|
|||||||
// add the Everyone '*' UUID
|
// add the Everyone '*' UUID
|
||||||
add(new StringWrapper("*"), DBFunc.everyone);
|
add(new StringWrapper("*"), DBFunc.everyone);
|
||||||
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
|
PlotSquared.log(C.PREFIX.s() + "&6Cached a total of: " + UUIDHandler.uuidMap.size() + " UUIDs");
|
||||||
System.out.print(System.currentTimeMillis() - start);
|
|
||||||
System.out.print(Settings.TWIN_MODE_UUID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static UUID getUUID(final PlotPlayer player) {
|
public static UUID getUUID(final PlotPlayer player) {
|
||||||
|
Loading…
Reference in New Issue
Block a user