MinevidOld / dtlTraders-plus-

Repository for dtlTraders
2 stars 2 forks source link

When you delete a shop in the GUI the NPC you had it selected on still works. #5

Open TomLewis opened 3 years ago

TomLewis commented 3 years ago

If you have a shop set to an NPC and you delete a shop in the GUI, the NPC will still have its trait. This should automatically be removed when you delete a shop. I found out that you have to manually run /trait remove trader with the exact name of the shop as the trait separate. This could easily be done automatically.

MinevidOld commented 3 years ago

We don't save the NPC id to the shop. Therefor it's can't be done easily :)

We would either save every NPC id linked to a shop OR whenever a shop is deleted run through every NPC check if it has the trait and get the shopname from it and see if it equals the shopname you trying to delete.

TomLewis commented 2 years ago

Sounds good.