3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Synchronize access to Bukkit#createBlockData to prevent occasional ConcurrentModification exceptions

- This isn't actually used anymore given the previous commit, however it's still best to keep it safe.
Dieser Commit ist enthalten in:
dordsor21 2021-01-14 12:47:02 +00:00
Ursprung 5e1289494e
Commit 54712e268a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
4 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -144,7 +144,7 @@ public final class FAWE_Spigot_v1_15_R2 extends CachedBukkitAdapter implements I
}
@Override
public BlockMaterial getMaterial(BlockState state) {
public synchronized BlockMaterial getMaterial(BlockState state) {
IBlockData bs = ((CraftBlockData) Bukkit.createBlockData(state.getAsString())).getState();
return new BlockMaterial_1_15_2(bs.getBlock(), bs);
}

Datei anzeigen

@ -144,7 +144,7 @@ public final class FAWE_Spigot_v1_16_R1 extends CachedBukkitAdapter implements I
}
@Override
public BlockMaterial getMaterial(BlockState state) {
public synchronized BlockMaterial getMaterial(BlockState state) {
IBlockData bs = ((CraftBlockData) Bukkit.createBlockData(state.getAsString())).getState();
return new BlockMaterial_1_16_1(bs.getBlock(), bs);
}

Datei anzeigen

@ -146,7 +146,7 @@ public final class FAWE_Spigot_v1_16_R2 extends CachedBukkitAdapter implements I
}
@Override
public BlockMaterial getMaterial(BlockState state) {
public synchronized BlockMaterial getMaterial(BlockState state) {
IBlockData bs = ((CraftBlockData) Bukkit.createBlockData(state.getAsString())).getState();
return new BlockMaterial_1_16_2(bs.getBlock(), bs);
}

Datei anzeigen

@ -146,7 +146,7 @@ public final class FAWE_Spigot_v1_16_R3 extends CachedBukkitAdapter implements I
}
@Override
public BlockMaterial getMaterial(BlockState state) {
public synchronized BlockMaterial getMaterial(BlockState state) {
IBlockData bs = ((CraftBlockData) Bukkit.createBlockData(state.getAsString())).getState();
return new BlockMaterial_1_16_4(bs.getBlock(), bs);
}