From dd84fc1c57fbce703747480f27738600803e7c35 Mon Sep 17 00:00:00 2001 From: Jeff Rafter Date: Fri, 17 Jun 2016 14:38:36 -0700 Subject: [PATCH] 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. --- src/com/projectkorra/projectkorra/util/ParticleEffect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/projectkorra/projectkorra/util/ParticleEffect.java b/src/com/projectkorra/projectkorra/util/ParticleEffect.java index 01236722..79fafc61 100644 --- a/src/com/projectkorra/projectkorra/util/ParticleEffect.java +++ b/src/com/projectkorra/projectkorra/util/ParticleEffect.java @@ -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"); }