mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Various
Close #966 Close #953 (duplicates) Changes to chunk copying etc to interfere less with world generation
This commit is contained in:
@ -2789,7 +2789,7 @@ public class Plot {
|
||||
// copy data
|
||||
for (final Plot plot : plots) {
|
||||
final Plot other = plot.getRelative(offset.x, offset.y);
|
||||
other.create(other.owner, false);
|
||||
other.create(plot.owner, false);
|
||||
if (!plot.getFlags().isEmpty()) {
|
||||
other.getSettings().flags = plot.getFlags();
|
||||
DBFunc.setFlags(other, plot.getFlags().values());
|
||||
@ -2799,19 +2799,19 @@ public class Plot {
|
||||
}
|
||||
if ((plot.members != null) && !plot.members.isEmpty()) {
|
||||
other.members = plot.members;
|
||||
for (final UUID member : other.members) {
|
||||
for (final UUID member : plot.members) {
|
||||
DBFunc.setMember(other, member);
|
||||
}
|
||||
}
|
||||
if ((plot.trusted != null) && !plot.trusted.isEmpty()) {
|
||||
other.trusted = plot.trusted;
|
||||
for (final UUID trusted : other.trusted) {
|
||||
for (final UUID trusted : plot.trusted) {
|
||||
DBFunc.setTrusted(other, trusted);
|
||||
}
|
||||
}
|
||||
if ((plot.denied != null) && !plot.denied.isEmpty()) {
|
||||
other.denied = plot.denied;
|
||||
for (final UUID denied : other.denied) {
|
||||
for (final UUID denied : plot.denied) {
|
||||
DBFunc.setDenied(other, denied);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,12 @@ public class PlotLoc {
|
||||
result = (prime * result) + z;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return x + "," + z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
|
@ -49,18 +49,22 @@ public abstract class ChunkManager {
|
||||
}
|
||||
}
|
||||
|
||||
public static void preProcessChunk(PlotChunk<?> chunk) {
|
||||
public static boolean preProcessChunk(PlotChunk<?> chunk) {
|
||||
if (CURRENT_FORCE_CHUNK != null) {
|
||||
CURRENT_FORCE_CHUNK.run(chunk);
|
||||
CURRENT_FORCE_CHUNK = null;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void postProcessChunk(PlotChunk<?> chunk) {
|
||||
public static boolean postProcessChunk(PlotChunk<?> chunk) {
|
||||
if (CURRENT_ADD_CHUNK != null) {
|
||||
CURRENT_ADD_CHUNK.run(chunk);
|
||||
CURRENT_ADD_CHUNK = null;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void largeRegionTask(final String world, final RegionWrapper region, final RunnableVal<ChunkLoc> task, final Runnable whenDone) {
|
||||
|
Reference in New Issue
Block a user