From e34dfe29eb0f79bde70dc8678c55ea9aafd568e0 Mon Sep 17 00:00:00 2001 From: Ian <46601096+iangbb@users.noreply.github.com> Date: Wed, 6 May 2020 22:53:24 +0100 Subject: [PATCH] Fix 'wrong number of arguments' invoking Bukkit#getPlayer --- .../src/main/java/app/ashcon/intake/bukkit/util/BukkitUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bukkit/src/main/java/app/ashcon/intake/bukkit/util/BukkitUtil.java b/bukkit/src/main/java/app/ashcon/intake/bukkit/util/BukkitUtil.java index 1240032..0a8716d 100644 --- a/bukkit/src/main/java/app/ashcon/intake/bukkit/util/BukkitUtil.java +++ b/bukkit/src/main/java/app/ashcon/intake/bukkit/util/BukkitUtil.java @@ -25,7 +25,7 @@ public static Player getPlayer(String name, CommandSender viewer) { return (Player) Bukkit.class .getDeclaredMethod("getPlayer", String.class, CommandSender.class) - .invoke(name, viewer); + .invoke(null, name, viewer); } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException error) { canSearchByViewer = false; }