Skip to content

Commit

Permalink
fix: silent chest opening
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelillo15 committed Sep 16, 2024
1 parent 7a1c86d commit 51d6197
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ public void onPlayerInteract(PlayerInteractEvent event) {
return;
}

StaffPlayerWrapper playerWrapper = playerWrapperManager.getStaffPlayer(player.getUniqueId()).get();
StaffPlayerWrapper playerWrapper = playerWrapperManager.getStaffPlayer(player.getUniqueId()).orElseThrow();

if (!playerWrapper.isInStaffMode()) {
return;
}

if (
event.getClickedBlock() == null ||
event.getClickedBlock().getType().name().contains("CHEST") ||
!(event.getClickedBlock().getState() instanceof Container container)
event.getClickedBlock() == null || !(event.getClickedBlock().getState() instanceof Container container)
) {
return;
}
Expand Down

0 comments on commit 51d6197

Please sign in to comment.