From d0f99295272ed8d862e8b602c602aee7e285d17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Endre=C3=9F?= Date: Tue, 16 Nov 2021 16:39:36 +0100 Subject: [PATCH] Completly fix InstanceBuilder.create --- .../spigot/rwg/legacy/api/util/java/InstanceBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/util/java/InstanceBuilder.java b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/util/java/InstanceBuilder.java index af8f6be..17225ab 100644 --- a/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/util/java/InstanceBuilder.java +++ b/legacy-api/src/main/java/net/sourcewriters/spigot/rwg/legacy/api/util/java/InstanceBuilder.java @@ -87,7 +87,7 @@ public static T create(final Class clazz, final Object... arguments) thro int tmpArgs = 0; for (int index = 0; index < count; index++) { for (int idx = 0; idx < max; idx++) { - if (!types[index].isAssignableFrom(classes[index])) { + if (!types[index].isAssignableFrom(classes[idx])) { continue; } tmpIdx[idx] = index;