From df77c315a7f7372d0204905258b9d593653f3b09 Mon Sep 17 00:00:00 2001 From: Roman Zhuravlev Date: Sat, 20 Sep 2025 01:28:41 +0500 Subject: [PATCH] Fix reflection --- .../main/java/org/zhdev/util/BukkitReflectionUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/org/zhdev/util/BukkitReflectionUtils.java b/bukkit/src/main/java/org/zhdev/util/BukkitReflectionUtils.java index ccd093b..b50cb74 100644 --- a/bukkit/src/main/java/org/zhdev/util/BukkitReflectionUtils.java +++ b/bukkit/src/main/java/org/zhdev/util/BukkitReflectionUtils.java @@ -54,7 +54,12 @@ class BukkitReflectionUtils { private static class ModernGameProfileConsumer implements GameProfileConsumer { private final Class __ResolvableProfile_CLASS = ReflectionUtils.getType("net.minecraft.world.item.component.ResolvableProfile"); private final Constructor __ResolvableProfile_CONSTRUCTOR; - protected final Method __setProfile__CraftMetaSkull__METHOD = ReflectionUtils.getMethod(__ResolvableProfile_CLASS, "setProfile", __ResolvableProfile_CLASS); + protected final Method __setProfile__CraftMetaSkull__METHOD = ReflectionUtils.methodSearcher() + .type(__CraftMetaSkull__CLASS) + .methodOf("setProfile") + .parameters(__ResolvableProfile_CLASS) + .returns(void.class) + .search(); ModernGameProfileConsumer() { Constructor resolvableConstructor;