Skip to content

Commit

Permalink
fix: Hide Players Near Important NPCs feature not working
Browse files Browse the repository at this point in the history
Closes #67
  • Loading branch information
Fix3dll committed Sep 24, 2024
1 parent 93244cc commit cda2b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ public void onEntityEvent(LivingEvent.LivingUpdateEvent e) {
}
}

if (entity instanceof EntityOtherPlayerMP && main.getConfigValues().isEnabled(Feature.HIDE_PLAYERS_NEAR_NPCS)
&& main.getUtils().isGuest() && main.getUtils().getMap() != Island.DUNGEON) {
if (entity instanceof EntityOtherPlayerMP && Feature.HIDE_PLAYERS_NEAR_NPCS.isEnabled()
&& !main.getUtils().isGuest() && main.getUtils().getMap() != Island.DUNGEON) {
float health = ((EntityOtherPlayerMP) entity).getHealth();

if (NPCUtils.getNpcLocations().containsKey(entity.getUniqueID())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public static void shouldRender(Entity entityIn, ReturnValue<Boolean> returnValu
}
}
}
if (mc.theWorld != null && main.getConfigValues().isEnabled(Feature.HIDE_PLAYERS_NEAR_NPCS)
&& !main.getUtils().isGuest() && currentMap != Island.DUNGEON) {
if (mc.theWorld != null && Feature.HIDE_PLAYERS_NEAR_NPCS.isEnabled() && !main.getUtils().isGuest()
&& currentMap != Island.DUNGEON) {
if (entityIn instanceof EntityOtherPlayerMP && !NPCUtils.isNPC(entityIn) && NPCUtils.isNearNPC(entityIn)) {
returnValue.cancel();
}
Expand Down

0 comments on commit cda2b3e

Please sign in to comment.