File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 5252
5353import javax .annotation .Nonnull ;
5454import javax .annotation .Nullable ;
55- import java .util .EnumMap ;
5655import java .util .HashMap ;
5756import java .util .Map ;
5857import java .util .Objects ;
58+ import java .util .concurrent .ConcurrentHashMap ;
5959
6060import static com .google .common .base .Preconditions .checkNotNull ;
6161
@@ -367,6 +367,9 @@ public static GameMode adapt(org.bukkit.GameMode gameMode) {
367367 //FAWE end
368368 }
369369
370+ private static final Map <Biome , BiomeType > biomeBiomeTypeCache = new ConcurrentHashMap <>();
371+ private static final Map <BiomeType , Biome > biomeTypeBiomeCache = new ConcurrentHashMap <>();
372+
370373 /**
371374 * Create a WorldEdit BiomeType from a Bukkit one.
372375 *
@@ -403,8 +406,8 @@ public static org.bukkit.entity.EntityType adapt(EntityType entityType) {
403406 //FAWE end
404407 }
405408
406- private static final EnumMap <Material , BlockType > materialBlockTypeCache = new EnumMap <>(Material . class );
407- private static final EnumMap <Material , ItemType > materialItemTypeCache = new EnumMap <>(Material . class );
409+ private static final Map <Material , BlockType > materialBlockTypeCache = new ConcurrentHashMap <>();
410+ private static final Map <Material , ItemType > materialItemTypeCache = new ConcurrentHashMap <>();
408411
409412 /**
410413 * Converts a Material to a BlockType.
Original file line number Diff line number Diff line change 2828import com .sk89q .worldedit .world .registry .BundledBlockRegistry ;
2929import com .sk89q .worldedit .world .registry .PassthroughBlockMaterial ;
3030import org .bukkit .Material ;
31- import org .bukkit .block .data .BlockData ;
32-
3331import javax .annotation .Nullable ;
34- import java .util .ArrayList ;
3532import java .util .Collection ;
3633import java .util .List ;
3734import java .util .Map ;
You can’t perform that action at this time.
0 commit comments