abouhanafy87 2 Share Posted January 17 hi everyone i try to get NPC that interacting me and the results is null target = NPCs.closest(npc-> npc.isInteractedWith() && Players.getLocal().getCharacterInteractingWithMe().getModel().equals(npc.getModel())); it's null Link to comment Share on other sites More sharing options...
holic 212 Share Posted January 18 Do a null check for Players.getLocal().getCharacterInteractingWithMe() and there's no need to compare models, you can just do Players.getLocal().getCharacterInteractingWithMe().equals(npc); also, someone else correct me if I'm wrong, I think you could be using getInteractingCharacter instead of getCharacterInteractingWithMe based on the isInteractedWith call abouhanafy87 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now