Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Fix incorrect Collections#unmodifiableSet usage
Dieser Commit ist enthalten in:
Ursprung
09ba78d1e9
Commit
f88432a709
@ -196,11 +196,11 @@ public class FAWEWorldNativeAccess_1_15_2 implements WorldNativeAccess<Chunk, IB
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void flushAsync(final boolean sendChunks) {
|
private synchronized void flushAsync(final boolean sendChunks) {
|
||||||
final Set<CachedChange> changes = Collections.unmodifiableSet(cachedChanges);
|
final Set<CachedChange> changes = Collections.unmodifiableSet(new HashSet<>(cachedChanges));
|
||||||
cachedChanges.clear();
|
cachedChanges.clear();
|
||||||
final Set<IntPair> toSend;
|
final Set<IntPair> toSend;
|
||||||
if (sendChunks) {
|
if (sendChunks) {
|
||||||
toSend = Collections.unmodifiableSet(cachedChunksToSend);
|
toSend = Collections.unmodifiableSet(new HashSet<>(cachedChunksToSend));
|
||||||
cachedChunksToSend.clear();
|
cachedChunksToSend.clear();
|
||||||
} else {
|
} else {
|
||||||
toSend = Collections.emptySet();
|
toSend = Collections.emptySet();
|
||||||
|
@ -197,11 +197,11 @@ public class FAWEWorldNativeAccess_1_16_R1 implements WorldNativeAccess<Chunk, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void flushAsync(final boolean sendChunks) {
|
private synchronized void flushAsync(final boolean sendChunks) {
|
||||||
final Set<CachedChange> changes = Collections.unmodifiableSet(cachedChanges);
|
final Set<CachedChange> changes = Collections.unmodifiableSet(new HashSet<>(cachedChanges));
|
||||||
cachedChanges.clear();
|
cachedChanges.clear();
|
||||||
final Set<IntPair> toSend;
|
final Set<IntPair> toSend;
|
||||||
if (sendChunks) {
|
if (sendChunks) {
|
||||||
toSend = Collections.unmodifiableSet(cachedChunksToSend);
|
toSend = Collections.unmodifiableSet(new HashSet<>(cachedChunksToSend));
|
||||||
cachedChunksToSend.clear();
|
cachedChunksToSend.clear();
|
||||||
} else {
|
} else {
|
||||||
toSend = Collections.emptySet();
|
toSend = Collections.emptySet();
|
||||||
|
@ -197,11 +197,11 @@ public class FAWEWorldNativeAccess_1_16_R2 implements WorldNativeAccess<Chunk, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void flushAsync(final boolean sendChunks) {
|
private synchronized void flushAsync(final boolean sendChunks) {
|
||||||
final Set<CachedChange> changes = Collections.unmodifiableSet(cachedChanges);
|
final Set<CachedChange> changes = Collections.unmodifiableSet(new HashSet<>(cachedChanges));
|
||||||
cachedChanges.clear();
|
cachedChanges.clear();
|
||||||
final Set<IntPair> toSend;
|
final Set<IntPair> toSend;
|
||||||
if (sendChunks) {
|
if (sendChunks) {
|
||||||
toSend = Collections.unmodifiableSet(cachedChunksToSend);
|
toSend = Collections.unmodifiableSet(new HashSet<>(cachedChunksToSend));
|
||||||
cachedChunksToSend.clear();
|
cachedChunksToSend.clear();
|
||||||
} else {
|
} else {
|
||||||
toSend = Collections.emptySet();
|
toSend = Collections.emptySet();
|
||||||
|
@ -196,11 +196,11 @@ public class FAWEWorldNativeAccess_1_16_R3 implements WorldNativeAccess<Chunk, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void flushAsync(final boolean sendChunks) {
|
private synchronized void flushAsync(final boolean sendChunks) {
|
||||||
final Set<CachedChange> changes = Collections.unmodifiableSet(cachedChanges);
|
final Set<CachedChange> changes = Collections.unmodifiableSet(new HashSet<>(cachedChanges));
|
||||||
cachedChanges.clear();
|
cachedChanges.clear();
|
||||||
final Set<IntPair> toSend;
|
final Set<IntPair> toSend;
|
||||||
if (sendChunks) {
|
if (sendChunks) {
|
||||||
toSend = Collections.unmodifiableSet(cachedChunksToSend);
|
toSend = Collections.unmodifiableSet(new HashSet<>(cachedChunksToSend));
|
||||||
cachedChunksToSend.clear();
|
cachedChunksToSend.clear();
|
||||||
} else {
|
} else {
|
||||||
toSend = Collections.emptySet();
|
toSend = Collections.emptySet();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren