mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Also synchronise when loading sections forcefully
This commit is contained in:
parent
8836d1d75c
commit
d015e6b270
@ -816,17 +816,12 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -817,17 +817,12 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -820,17 +820,12 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
@ -820,17 +820,12 @@ public class BukkitGetBlocks_1_16_5 extends CharGetBlocks implements BukkitGetBl
|
||||
}
|
||||
|
||||
public ChunkSection[] getSections(boolean force) {
|
||||
if (force && forceLoadSections) {
|
||||
ChunkSection[] sections = getChunk().getSections();
|
||||
ChunkSection[] copy = new ChunkSection[sections.length];
|
||||
System.arraycopy(sections, 0, copy, 0, sections.length);
|
||||
return copy;
|
||||
}
|
||||
force &= forceLoadSections;
|
||||
ChunkSection[] tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
synchronized (this) {
|
||||
tmp = sections;
|
||||
if (tmp == null) {
|
||||
if (tmp == null || force) {
|
||||
ChunkSection[] chunkSections = getChunk().getSections();
|
||||
tmp = new ChunkSection[chunkSections.length];
|
||||
System.arraycopy(chunkSections, 0, tmp, 0, chunkSections.length);
|
||||
|
Loading…
Reference in New Issue
Block a user