Skip to content

Commit

Permalink
fix: entities other than the player are no longer shown on right click
Browse files Browse the repository at this point in the history
  • Loading branch information
irinque committed Feb 22, 2025
1 parent 10d5bc3 commit 5aaa910
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void onPlayerClick (PlayerInteractAtEntityEvent event)
Entity entity_clicked = event.getRightClicked();
Player player = event.getPlayer();

if (!entity_clicked.hasMetadata("NPC") && !player.isSneaking())
if (entity_clicked instanceof Player && !player.isSneaking())
{
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacy(entity_clicked.getName()));
}
Expand Down

0 comments on commit 5aaa910

Please sign in to comment.