From 53cdf10e5faef9d7c2433ca84f29b52f392fd112 Mon Sep 17 00:00:00 2001 From: Fulminazzo Date: Mon, 23 Dec 2024 17:19:06 +0100 Subject: [PATCH] Updated wParticleToGeneral for retro compatibility --- .../src/main/java/it/fulminazzo/yagl/WrappersAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f1ee0085..2103916f 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 (org.bukkit.Particle.class.isAssignableFrom(tClass)) actual = (T) ParticleConverter.convertToBukkit(particle); + if (tClass.getCanonicalName().equals("org.bukkit.Particle.class")) actual = (T) ParticleConverter.convertToBukkit(particle); else actual = EnumUtils.valueOf(tClass, particle.getType()); Object option = particle.getOption(); Class dataType = dataTypeGetter.apply(actual);