#(Lycheeeees) setTarget location teleports npcs
26 messages · Page 1 of 1 (latest)
(Lycheeeees) setTarget location teleports npcs
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
I also get an error when deleting npc's in the CitizensEnableEvent.
this is the way i delete all the npc's:
public void despawnAndDeleteAllNPCs() {
NPCRegistry npcRegistry = CitizensAPI.getNPCRegistry();
for (NPC npc : npcRegistry) {
npc.despawn(); // Despawn the NPC
npc.destroy(); // Delete the NPC
}
}```
nvm that last code i found the way
Why are you doing that? if you're trying to make your own NPCs not save, should just use your own registry
This page contains frequently asked questions regarding the Citizens project. You should always check here before submitting an issue, asking on Discord, or posting on the forum thread. Your queries could very well have already been answered here.
the thing that bothers me the most tho is i want the npc to always have max health. Still take damage but no effect on health.
I use this event listener but it doesnt work:
public class NPCDamageEvent implements Listener {
@EventHandler
public void onNPCDamage(net.citizensnpcs.api.event.NPCDamageEvent e) {
e.setDamage(0);
}
}```
thank you
the original question is also in the FAQ: https://wiki.citizensnpcs.co/Frequently_Asked_Questions#Why_is_my_NPC_teleporting_when_its_supposed_to_be_walking?
This page contains frequently asked questions regarding the Citizens project. You should always check here before submitting an issue, asking on Discord, or posting on the forum thread. Your queries could very well have already been answered here.
doesn't work how? It still takes damage, or it doesn't display the damage effect?
it ended up working by using a entitydamagebyentityevent and checking if its an npc.
great ill try these out once im home thanks!
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@quasi plaza