mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Fix /plot auto
performance and remove sign-guessing
This commit is contained in:
parent
0d4af3023d
commit
283ff945f3
3 changed files with 102 additions and 99 deletions
|
@ -285,15 +285,15 @@ public class BukkitChunkManager extends ChunkManager {
|
|||
int zzb = z << 4;
|
||||
int xxt = xxb + 15;
|
||||
int zzt = zzb + 15;
|
||||
Chunk chunkObj = worldObj.getChunkAt(x, z);
|
||||
if (!chunkObj.load(false)) {
|
||||
continue;
|
||||
PaperLib.getChunkAtAsync(worldObj, x, z, false).thenAccept(chunkObj -> {
|
||||
if (chunkObj == null) {
|
||||
return;
|
||||
}
|
||||
final LocalBlockQueue queue = GlobalBlockQueue.IMP.getNewQueue(world, false);
|
||||
if (xxb >= p1x && xxt <= p2x && zzb >= p1z && zzt <= p2z) {
|
||||
AugmentedUtils.bypass(ignoreAugment,
|
||||
() -> queue.regenChunkSafe(chunk.getX(), chunk.getZ()));
|
||||
continue;
|
||||
return;
|
||||
}
|
||||
boolean checkX1 = false;
|
||||
|
||||
|
@ -390,6 +390,7 @@ public class BukkitChunkManager extends ChunkManager {
|
|||
}, world, chunk));
|
||||
//map.restoreBlocks(worldObj, 0, 0);
|
||||
map.restoreEntities(worldObj, 0, 0);
|
||||
});
|
||||
}
|
||||
if (!chunks.isEmpty()) {
|
||||
TaskManager.runTaskLater(this, 1);
|
||||
|
|
|
@ -352,5 +352,7 @@ public class Settings extends Config {
|
|||
public static boolean EXTERNAL_PLACEHOLDERS = true;
|
||||
@Comment("Make road regeneration persistent across restarts") public static boolean
|
||||
PERSISTENT_ROAD_REGEN = false;
|
||||
@Comment("Try to guess plot owners from sign data. This may decrease server performance")
|
||||
public static boolean GUESS_PLOT_OWNER = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2368,7 +2368,7 @@ public class Plot {
|
|||
if (this.hasOwner()) {
|
||||
return this.owner;
|
||||
}
|
||||
if (!this.area.allowSigns()) {
|
||||
if (!this.area.allowSigns() || !Settings.Enabled_Components.GUESS_PLOT_OWNER) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue