Skip to content

Commit 1eb49dc

Browse files
authored
Merge pull request #1 from alwyn974/main
fix(item-provider): Deposit & Withdraw was inverted
2 parents 8081eb8 + 6e36653 commit 1eb49dc

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=1.0.5
1+
version=1.0.6

src/main/java/fr/traqueur/currencies/providers/ItemProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public ItemProvider(Plugin plugin, ItemStack itemStack) {
2323
public void deposit(OfflinePlayer offlinePlayer, BigDecimal amount, String reason) {
2424
if (offlinePlayer.isOnline()) {
2525
Player player = offlinePlayer.getPlayer();
26-
removeItems(player, this.itemStack, amount.intValue());
26+
giveItem(player, amount.intValue(), this.itemStack);
2727
} else{
2828
this.plugin.getLogger().severe("Deposit items to " + offlinePlayer.getName() + " but is offline");
2929
}
@@ -33,7 +33,7 @@ public void deposit(OfflinePlayer offlinePlayer, BigDecimal amount, String reaso
3333
public void withdraw(OfflinePlayer offlinePlayer, BigDecimal amount, String reason) {
3434
if (offlinePlayer.isOnline()) {
3535
Player player = offlinePlayer.getPlayer();
36-
giveItem(player, amount.intValue(), this.itemStack);
36+
removeItems(player, this.itemStack, amount.intValue());
3737
} else {
3838
this.plugin.getLogger().severe("Withdraw items from " + offlinePlayer.getName() + " but is offline");
3939
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=1.0.5
1+
version=1.0.6

0 commit comments

Comments
 (0)