Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Fix pay commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Flibio committed Apr 8, 2017
1 parent f7e9ef1 commit faae42c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ name=EconomyLite
owner=Flibio
inceptionYear=2015
currentYear=2017
version=2.10.2
version=2.10.3
apiVersion=5.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Builder getCommandSpecBuilder() {
public void run(Player src, CommandContext args) {
if (args.getOne("player").isPresent() && args.getOne("amount").isPresent()) {
BigDecimal amount = BigDecimal.valueOf(args.<Double>getOne("amount").get());
if (amount.compareTo(BigDecimal.ONE) == -1) {
if (amount.doubleValue() <= 0) {
src.sendMessage(messageStorage.getMessage("command.pay.invalid"));
} else {
User target = args.<User>getOne("player").get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void run(Player src, CommandContext args) {
Optional<Account> aOpt = EconomyLite.getEconomyService().getOrCreateAccount(target);
Optional<UniqueAccount> uOpt = EconomyLite.getEconomyService().getOrCreateAccount(src.getUniqueId());
// Check for negative payments
if (amount.compareTo(BigDecimal.ONE) == -1) {
if (amount.doubleValue() <= 0) {
src.sendMessage(messageStorage.getMessage("command.pay.invalid"));
} else {
if (aOpt.isPresent() && uOpt.isPresent()) {
Expand Down

0 comments on commit faae42c

Please sign in to comment.