Skip to content

Commit 1baaf13

Browse files
authored
Merge pull request #206 from bundabrg/fix/pay-bug
Fix pay command always sending 0.
2 parents ff62fcc + 10705c8 commit 1baaf13

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/gestern/gringotts/commands/MoneyExecutor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ public boolean onCommand(CommandSender sender, Command cmd, String commandLabel,
4545
return true;
4646
}
4747
} else if ( args.length == 3 && "pay".equals(command)) {
48+
try {
49+
value = Double.parseDouble(args[1]);
50+
} catch (NumberFormatException ignored) {
51+
return false;
52+
}
53+
4854
// money pay <amount> <player>
4955
return pay(player, value, args);
5056
}

0 commit comments

Comments
 (0)