Skip to content

Commit

Permalink
Fix 'wrong number of arguments' invoking Bukkit#getPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
iangbb authored and Electroid committed May 7, 2020
1 parent f8a6fbd commit e34dfe2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e34dfe2

Please sign in to comment.