[Suggestion] log spawning of entities
marcbal opened this issue · 1 comments
As stated in the issue #26, I’m resubmitting a suggestion that was originally on BukkitDev. My suggestion is based on the following BukkitDev issues :
Tracking Moving entities
Logging for spawned creepers
Log spawning of entities
Feature Suggestions [Tiippex]
(part of this one)
The suggestion is to be able to log the spawn of a mob. The plugin could try to figure out which player spawned the entity, or if it’s a natural / command triggered spawn.
Why?
I have regular complains on my server involving blocs infested with silverfish, in a location where there is no naturally infested block around. We are trying to find if someone tried to spawn silverfish around the player’s building, but the CoreProtect doesn’t seems to log that information.
Rolling back a villager conversion to a zombie results in the villager and the converted zombie villager standing in the same area (even with skip-generic-data
set to false). Similarly, when I roll back near my iron farm, hundreds of iron golems are brought into the world. I'm using CoreProtect 20.4 on CraftBukkit 1.18.1.
It looks like the creation of these mobs was not logged, so it can't revert them when I roll back. This is definitely a big problem, and it should be addressed.
I know that logging the creation of every entity would result in a lot of data being stored, but I think solving this problem is more important - the issue makes using CoreProtect frustrating and it makes it feel buggy. If it really is impractical to store the creation of every mob, I suggest we pick and choose:
- Logging the creation of mobs created as the result of common griefing techniques
- The creation of the converted zombie villager after a villager gets killed by a zombie. That way, when you roll back, the zombie is gone when the villager is re-added to the world.
- Silverfish (like in the original post)
However, say a griefer leads a bunch of zombies to someone's house, names them all and leaves. The only way to roll back something like this automatically is to log the creation of every mob.
I can make a PR for this issue on approval