Skip to content

Commit

Permalink
Added missing spawned check
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 3, 2024
1 parent 143e642 commit 249fa66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/src/main/java/net/citizensnpcs/trait/SneakTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public boolean isSneaking() {

@Override
public void onAttach() {
sneaking = NMS.isSneaking(npc.getEntity());
if (npc.isSpawned()) {
sneaking = NMS.isSneaking(npc.getEntity());
}
}

@Override
Expand Down

0 comments on commit 249fa66

Please sign in to comment.