Skip to content

Commit

Permalink
Don't re-open if it was cancelled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Trophonix committed Jun 2, 2019
1 parent a9e9e99 commit b0f2d91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.trophonix</groupId>
<artifactId>TradePlus</artifactId>
<version>3.46</version>
<version>3.47</version>

<properties>
<res>${project.basedir}/res/</res>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/trophonix/tradeplus/extras/Extra.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void onClick(Player player, ClickType click) {
.replace("%AMOUNT%", decimalFormat.format(offer));
}
}).withTimeout(30).addConversationAbandonedListener(event -> {
if (trade.cancelled) return;
if (!event.gracefulExit()) Sounds.villagerHmm(player, 1f);
trade.open(player);
trade.updateExtras();
Expand Down

0 comments on commit b0f2d91

Please sign in to comment.