Skip to content

Commit

Permalink
fix gunpowder bal
Browse files Browse the repository at this point in the history
  • Loading branch information
Flemmli97 committed Jul 22, 2021
1 parent 36b7130 commit 924b5dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version=1.17
yarn_mappings=1.17+build.1
loader_version=0.11.3
# Mod Properties
mod_version=1.5.4
mod_version=1.5.5
maven_group=io.github.flemmli97
archives_base_name=flan
# Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static int sellClaimBlocks(CommandContext<ServerCommandSource> context) t
BigDecimal price = BigDecimal.valueOf(amount * ConfigHandler.config.sellPrice);
bal.setBalance(bal.getBalance().add(price));
data.setAdditionalClaims(data.getAdditionalClaims() - amount);
BalanceHandler.INSTANCE.updateUser(bal);
context.getSource().sendFeedback(PermHelper.simpleColoredText(String.format(ConfigHandler.lang.sellSuccess, amount, price), Formatting.GOLD), false);
return Command.SINGLE_SUCCESS;
}
Expand All @@ -56,6 +57,7 @@ public static int buyClaimBlocks(CommandContext<ServerCommandSource> context) th
PlayerClaimData data = PlayerClaimData.get(context.getSource().getPlayer());
data.setAdditionalClaims(data.getAdditionalClaims() + amount);
bal.setBalance(bal.getBalance().subtract(price));
BalanceHandler.INSTANCE.updateUser(bal);
context.getSource().sendFeedback(PermHelper.simpleColoredText(String.format(ConfigHandler.lang.buySuccess, amount, price), Formatting.GOLD), false);
return Command.SINGLE_SUCCESS;
}
Expand Down

0 comments on commit 924b5dd

Please sign in to comment.