Merge pull request #26 from Yakaita/main

changed to one if instead of 2?
This commit is contained in:
Kiran Hart 2022-12-13 21:50:33 -05:00 committed by GitHub
commit a7305b8a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);