diff --git a/pom.xml b/pom.xml index 2701618..e982b90 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ org.bukkit bukkit - 1.8.7-R0.1-SNAPSHOT + 1.12-R0.1-SNAPSHOT provided diff --git a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java index 6db6726..d8c6051 100644 --- a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java +++ b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java @@ -1404,10 +1404,10 @@ public static void initialize() throws VersionIncompatibleException { } try { version = Integer.parseInt(Character.toString(PackageType.getServerVersion().charAt(3))); - if (version > 7) { + if (version > 7 || version <= 1) { enumParticle = PackageType.MINECRAFT_SERVER.getClass("EnumParticle"); } - Class packetClass = PackageType.MINECRAFT_SERVER.getClass(version < 7 ? "Packet63WorldParticles" : "PacketPlayOutWorldParticles"); + Class packetClass = PackageType.MINECRAFT_SERVER.getClass(version < 7 && version > 1 ? "Packet63WorldParticles" : "PacketPlayOutWorldParticles"); packetConstructor = ReflectionUtils.getConstructor(packetClass); getHandle = ReflectionUtils.getMethod("CraftPlayer", PackageType.CRAFTBUKKIT_ENTITY, "getHandle"); playerConnection = ReflectionUtils.getField("EntityPlayer", PackageType.MINECRAFT_SERVER, false, "playerConnection"); @@ -1452,7 +1452,7 @@ private void initializePacket(Location center) throws PacketInstantiationExcepti } try { packet = packetConstructor.newInstance(); - if (version < 8) { + if (version < 8 && version > 1) { String name = effect.getName(); if (data != null) { name += data.getPacketDataString();