Expand API to add exceptions to PlotSquared settings
What feature do you want to see added?
PlotSquared has a lot of game-controlling settings/components. It would be nice if we could use the API to create some exceptions for these settings.
The biggest example I would love to see is to be able to exempt specific mobs from the "kill-road-mobs" and "entity-pathing" settings, so certain mobs can be allowed to path onto and walk around on the road, while others wouldn't.
Are there any alternatives?
N/A
Anything else?
No response
Whilst this is relatively simple to implement using metadata, having any form of persistent "setting" would require database-storage and therefore likely a UUID cache kept in memory as entities won't necessarily be loaded on server start to assign metadata. @IntellectualSites/plotsquared-team thoughts?
While having a way to interface with configurations are handy, complex components like mobs doing pathfinding should be controlled via flags, like other components are controlled. The options to kill mobs or items could be turned into lists instead of booleans, to fine grain control of which parts should be deleted.
An API where the settings you can control are just the default implementation would be cool, but that's a lot of work to do, and especially to do it properly.
My specific use case that prompted me to make this feature suggestion in the first place is that I use a pet plugin (SimplePets), and I would like players' pets to be able to survive and follow them around across the road and across plots, regardless of the state of the "kill-road-mobs" and "entity-pathing" settings.
My idea was to check whether an entity is a pet (by hooking into SimplePets' API), and then exempt them using an API you guys implement, if you do.
I think I may have been a bit unclear in part of my feature request - when I said "certain mobs", I didn't mean certain mob types, (i.e. pigs, creepers, zombies, etc.). Instead, I meant particular instances of mobs that would be targeted in code.
If I'm not mistaken, something like this would leave the responsibility of persistent storage (if they want it) to the person using the API. If they want entities to stay exempt between sessions, they would have to store those entities somewhere, and then tell PlotSquared to exempt them at some point during each startup (?) - PlotSquared should also be able to be told to exempt entities on spawn.