Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure that npcs are removed correctly #1349

Merged
merged 4 commits into from
Feb 25, 2024
Merged

Conversation

0utplay
Copy link
Member

@0utplay 0utplay commented Jan 12, 2024

Motivation

When creating a npc on a service created from a static task, the infolines (and for entity npcs even the entity itself) are saved to the disk. After restarting the service the entity and info lines are duplicated because the plugin respawns them (as it should) but there are still the old ones from the disk.

Modification

Added a new close method to the PlatformNPCManagement. By default it removes all tracked entities (thus all info lines are removed too). The new method is called on plugin disable.

Result

No duplicates.

Other context

Fixes #1348

@0utplay 0utplay added v: 4.X This pull should be included in the 4.0 release t: fix A pull request introducing a fix for a bug. in: module An issue/pull request releated to one of the internal modules labels Jan 12, 2024
@0utplay 0utplay added this to the 4.0.0-RC10 milestone Jan 12, 2024
@0utplay 0utplay requested a review from derklaro January 12, 2024 17:36
@0utplay 0utplay self-assigned this Jan 12, 2024
Copy link

github-actions bot commented Jan 13, 2024

Test Results

 47 files   47 suites   1m 17s ⏱️
394 tests 394 ✅ 0 💤 0 ❌
724 runs  724 ✅ 0 💤 0 ❌

Results for commit de1fead.

♻️ This comment has been updated with latest results.

@derklaro derklaro merged commit 2693eb5 into nightly Feb 25, 2024
6 checks passed
@derklaro derklaro deleted the npc-entity-saving branch February 25, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: module An issue/pull request releated to one of the internal modules t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CloudnetNPC Entities in RC10 not despawning
2 participants