From 3d39499780e16caca0e8b823b7f6ceb44c86e119 Mon Sep 17 00:00:00 2001 From: Jeremy <42159319+Yakaita@users.noreply.github.com> Date: Tue, 13 Dec 2022 20:50:03 -0500 Subject: [PATCH] changed to one if instead of 2? --- .../java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java index 955ffc3..f7d29f6 100644 --- a/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java +++ b/src/main/java/ca/tweetzy/auctionhouse/listeners/PlayerListeners.java @@ -97,7 +97,7 @@ public class PlayerListeners implements Listener { final Player player = e.getPlayer(); final AuctionHouse instance = AuctionHouse.getInstance(); - if (instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()) != null) if (instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()).getItemBeingListed() != null) { + if (instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()) != null && instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()).getItemBeingListed() != null) { player.getInventory().addItem(instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()).getItemBeingListed()); instance.getAuctionPlayerManager().getPlayer(player.getUniqueId()).setItemBeingListed(null);