BG-Software-LLC / WildLoaders

Very optimized and highly configureable chunk-loaders plugin!
https://bg-software.com/wildloaders/
GNU General Public License v3.0
28 stars 15 forks source link

Add a metadata to fake players so external plugins can detect them #82

Closed SkytAsul closed 2 months ago

SkytAsul commented 7 months ago

Minecraft's Version

1.20.4

Plugin's Version

2023.3

Describe the bug

Not a bug, but you told me to open an issue and that's the only template I am allowed to choose. Anyway, it's related to this discussion: https://github.com/BG-Software-LLC/WildLoaders/discussions/81 Bukkit#getPlayers maybe does not return your NPCs, but some player events are still fired with the NPCs. The "NPC" metadata is quite common (Citizens does it, for instance) so that would be nice to add, and it does not have any drawback afaik.

To Reproduce

nothing

Additional Information

No response

OmerBenGera commented 7 months ago

Which events are fired? I want to get rid of them, and I will also add the metadata.

SkytAsul commented 7 months ago

I cannot tell exactly. I will get back to you once the user that reported the bug in my plugin answers. In the meantime yeah it would be nice to have the metadata.

OmerBenGera commented 7 months ago

Have you looked into the events that are fired?

OmerBenGera commented 4 months ago

Any news regarding this?

SkytAsul commented 4 months ago

Sorry, I've got no response about it. I will try to reproduce and let you know.

SkytAsul commented 4 months ago

I've succeeded in reproducing the problem: it is caused by World#getPlayers() returning a collection containing WildLoaders fake players.

OmerBenGera commented 4 months ago

Check out latest dev build, NPCs should now have the "NPC" metadata.

SkytAsul commented 4 months ago

Thank you!

OmerBenGera commented 4 months ago

Let me know if that all what you need and that it works

SkytAsul commented 2 months ago

Sorry not to have answered before, it works! Thank you very much.