Skip to content

Commit

Permalink
Merge pull request #10 from Sneyzi/patch-1
Browse files Browse the repository at this point in the history
Update TradeListeners.java
  • Loading branch information
BenceX100 authored Feb 7, 2025
2 parents 4f93ad0 + 0ae334e commit dc758ea
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void onMove(@NotNull PlayerMoveEvent event) {
final Player player = event.getPlayer();
final Trade trade = Trades.getTrade(player);
if (trade == null) return;
if (System.currentTimeMillis() - trade.getPrepTime() < 1_000L) return;
if (event.getFrom().distanceSquared(event.getTo()) == 0) return;
trade.abort();
}
Expand Down

0 comments on commit dc758ea

Please sign in to comment.