CloudNetService / CloudNet

A modern application that can dynamically and easily deliver Minecraft oriented software
https://cloudnetservice.eu
Apache License 2.0
376 stars 119 forks source link

fix: ensure that npcs are removed correctly #1349

Closed 0utplay closed 7 months ago

0utplay commented 8 months ago

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

github-actions[bot] commented 8 months ago

Test Results

 47 files   47 suites   1m 17s :stopwatch: 394 tests 394 :white_check_mark: 0 :zzz: 0 :x: 724 runs  724 :white_check_mark: 0 :zzz: 0 :x:

Results for commit de1feade.

:recycle: This comment has been updated with latest results.