Double lock fix

This commit is contained in:
TheMode 2021-07-29 00:00:08 +02:00
parent d6dd81b35f
commit 5fe72d4e2b
3 changed files with 3 additions and 3 deletions

View File

@ -303,7 +303,7 @@ public class Metadata {
case TYPE_CHAT:
return (Value<T>) Chat(Component.empty());
case TYPE_OPTCHAT:
return (Value<T>) OptChat((Component) null);
return (Value<T>) OptChat(null);
case TYPE_SLOT:
return (Value<T>) Slot(ItemStack.AIR);
case TYPE_BOOLEAN:

View File

@ -28,7 +28,7 @@ public class MinestomRootClassLoader extends HierarchyClassLoader {
public final static Logger LOGGER = LoggerFactory.getLogger(MinestomRootClassLoader.class);
private static MinestomRootClassLoader INSTANCE;
private static volatile MinestomRootClassLoader INSTANCE;
/**
* Classes that cannot be loaded/modified by this classloader.

View File

@ -74,7 +74,7 @@ public enum MapColors {
private static final ConcurrentHashMap<Integer, PreciseMapColor> rgbMap = new ConcurrentHashMap<>();
// only used if mappingStrategy == ColorMappingStrategy.PRECISE
private static PreciseMapColor[] rgbArray = null;
private static volatile PreciseMapColor[] rgbArray = null;
private static final ColorMappingStrategy mappingStrategy;
private static final String MAPPING_ARGUMENT = "minestom.map.rgbmapping";