diff --git a/wrappers/bukkit/src/main/java/it/fulminazzo/yagl/WrappersAdapter.java b/wrappers/bukkit/src/main/java/it/fulminazzo/yagl/WrappersAdapter.java index 2103916f..ccfdd1a0 100644 --- a/wrappers/bukkit/src/main/java/it/fulminazzo/yagl/WrappersAdapter.java +++ b/wrappers/bukkit/src/main/java/it/fulminazzo/yagl/WrappersAdapter.java @@ -343,7 +343,7 @@ public static void spawnEffect(final @NotNull Player player, final @NotNull Part final @NotNull Class tClass, final @NotNull Function> dataTypeGetter) { T actual; - if (tClass.getCanonicalName().equals("org.bukkit.Particle.class")) actual = (T) ParticleConverter.convertToBukkit(particle); + if (tClass.getCanonicalName().equals("org.bukkit.Particle")) actual = (T) ParticleConverter.convertToBukkit(particle); else actual = EnumUtils.valueOf(tClass, particle.getType()); Object option = particle.getOption(); Class dataType = dataTypeGetter.apply(actual);