The new 1.10 version looks like version 0 (#504)

Instead of just grabbing the last char, grab the last part of the string (after the .) and parseInt that. Then the numeric version compares will return the right class.
This commit is contained in:
Jeff Rafter 2016-06-17 14:38:36 -07:00 committed by OmniCypher
parent 913780cb85
commit dd84fc1c57

View file

@ -1148,7 +1148,7 @@ public enum ParticleEffect {
return;
}
try {
version = Integer.parseInt(Character.toString(PackageType.getServerVersion().charAt(3)));
version = Integer.parseInt(PackageType.getServerVersion().substring(PackageType.getServerVersion().lastIndexOf('.') + 1));
if (version > 7) {
enumParticle = PackageType.MINECRAFT_SERVER.getClass("EnumParticle");
}