Skip to content

Commit

Permalink
fix: NPE with PlayerInteractEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
Eredrim committed Jan 19, 2025
1 parent 86e766e commit 64666e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void onPlayerInteract(final PlayerInteractEvent event) {
ArenaPlayer arenaPlayer = ArenaPlayer.fromPlayer(player);
Arena arena = arenaPlayer.getArena();

if (arena == null) {
if (arena == null && event.getClickedBlock() != null) {
Arena arenaByLocation = ArenaManager.getArenaByRegionLocation(new PABlockLocation(event.getClickedBlock().getLocation()));
if (arenaByLocation != null) {
// Player doesn't belong to an arena but interacts with an arena region
Expand Down

0 comments on commit 64666e8

Please sign in to comment.