Mark ParticleTypes as immutable, update tested version

This commit is contained in:
Dan Mulloy 2018-09-22 12:17:02 -04:00
parent 6ff6976e85
commit 083c8e1481
2 changed files with 10 additions and 5 deletions

View File

@ -39,12 +39,12 @@ public class ProtocolLibrary {
/**
* The maximum version ProtocolLib has been tested with.
*/
public static final String MAXIMUM_MINECRAFT_VERSION = "1.12.2";
public static final String MAXIMUM_MINECRAFT_VERSION = "1.13.1";
/**
* The date (with ISO 8601 or YYYY-MM-DD) when the most recent version (1.12.2) was released.
* The date (with ISO 8601 or YYYY-MM-DD) when the most recent version (1.13.1) was released.
*/
public static final String MINECRAFT_LAST_RELEASE_DATE = "2017-09-18";
public static final String MINECRAFT_LAST_RELEASE_DATE = "2018-08-22";
/**
* Plugins that are currently incompatible with ProtocolLib.

View File

@ -33,6 +33,7 @@ import java.util.function.Supplier;
import javax.crypto.SecretKey;
import com.comphenix.protocol.utility.MinecraftReflection;
import com.comphenix.protocol.utility.MinecraftVersion;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.google.common.primitives.Primitives;
@ -62,8 +63,12 @@ public class ImmutableDetector implements Cloner {
add(() -> MinecraftReflection.getMinecraftClass("SoundEffect"));
add(MinecraftReflection::getBlockClass);
add(MinecraftReflection::getItemClass);
add(MinecraftReflection::getFluidTypeClass);
add(MinecraftReflection::getParticleTypeClass);
if (MinecraftVersion.atOrAbove(MinecraftVersion.AQUATIC_UPDATE)) {
add(() -> MinecraftReflection.getMinecraftClass("Particle"));
add(MinecraftReflection::getFluidTypeClass);
add(MinecraftReflection::getParticleTypeClass);
}
}
private static void add(Supplier<Class<?>> getClass) {