From d3106bcf3b350d3a8da6e701c2a25f6485860ed5 Mon Sep 17 00:00:00 2001 From: James103 <37945304+James103@users.noreply.github.com> Date: Tue, 19 May 2020 22:33:19 -0500 Subject: [PATCH] Fix squeek502/AppleCore#146: Conflicting arguments in /hunger command --- java/squeek/applecore/commands/CommandHunger.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/squeek/applecore/commands/CommandHunger.java b/java/squeek/applecore/commands/CommandHunger.java index 7608d2d..2a88a4c 100644 --- a/java/squeek/applecore/commands/CommandHunger.java +++ b/java/squeek/applecore/commands/CommandHunger.java @@ -40,7 +40,7 @@ public void execute(@Nonnull MinecraftServer server, @Nonnull ICommandSender com { if (args.length > 0) { - EntityPlayerMP playerToActOn = args.length >= 2 ? getPlayer(server, commandSender, args[1]) : getCommandSenderAsPlayer(commandSender); + EntityPlayerMP playerToActOn = args.length >= 2 ? getPlayer(server, commandSender, args[0]) : getCommandSenderAsPlayer(commandSender); int maxHunger = AppleCoreAPI.accessor.getMaxHunger(playerToActOn); int newHunger = args.length >= 2 ? parseInt(args[1], 0, maxHunger) : parseInt(args[0], 0, maxHunger); @@ -65,4 +65,4 @@ public List getTabCompletions(MinecraftServer server, ICommandSender sen else return Collections.emptyList(); } -} \ No newline at end of file +}