Shopkeepers

Shopkeepers

2M Downloads

(Request) Remove shopkeeper when failed to spawn feature

blablubbabcDEV opened this issue ยท 5 comments

commented

Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/316

Originally posted by MasterMithrandir (May 21, 2015):

I would like to suggest a new (optional) function for removing shopkeepers which fail to spawn a configured ammount of times, example:"failed-to-spawn-removal: <#>" = Would remove shopkeepers after failing to spawn the configured ammount of times.http://s17.postimg.org/bfzblvegv/Screenshot_1.pngHoping you consider it blablubbabc, in any case, congratulations on the fine management of Shopkeepers :)

commented

Originally commented by blablubbabc (May 21, 2015):

Usually you would want to look into that and check, as an admin, why they can't be spawned there, no?
Removing shops automatically because some other plugin is messing something up is normally not wanted, both for player- as well for admin-shops, because in both cases you lose the shop, it's configuration, and for player shops people also potentially use their items, because the chest is no longer protected afterwards.
This warning message is really only meant for you as an admin to go there and check for issues and resolve potential incompatibilities between plugins and setups.
If you are instead asking for a tool which makes it easier as admin to remove shops, in an area for example, I could look into adding commands for that. For example removing all shops in the current chunk, or a radius or something like this.

commented

Originally commented by MasterMithrandir (May 21, 2015):

A solution for this is using Permissions per Area, for my central trading zone, we already talked about this on another ticket.

BUT I would be depending on a whole plugin just for forbidding players from spawning shopkeepers on an area where many mobs and live entities can't spawn (shopkeepers is one of them), which consequently causes the failed to spawn shopkeeper message.

Of course, if you don't feel like this (optional "failed to spawn removal" feature, not everyone has to use it) feature is worthy of your plugin, I will be forced to look for an alternative.

I wouldn't find that tool you mention usefull, as in my central trading area there are both entity shopkeepers trying to spawn, and actual correctly setup sign shopkeepers which are working correctly, unless this tool actually discriminated between spawned and unspawned shopkeepers.

So the best thing in my oppinion is for the plugin to optionally check how many times a shopkeeper fails to spawn, and delete it once it reaches a certain number.

That way, if a shopkeeper only fails to spawn once for whatever reason, it won't get deleted, but it will if the plugin is configured to delete it after failing 40 times.

I can also just remove them manually, but there's quite a few, and not a very appealing idea. Just remember the solution I suggest is Optional.
Edited May 21, 2015

commented

Originally commented by blablubbabc (May 21, 2015):

[at]MasterMithrandir:
I still believe the cleanest solution to your trading area issue is stopping the players from creating those shops there in the first place, instead of trying to cleanup the mess afterwards.
That one plugin which dynamically modifies permissions was one solution I could quickly think of.

I am not aware anymore of the concrete setup of your trading area regions, but another solution might be to (find someone to) write a small addon plugin, which cancles shopkeeper creations if they are outside of your trading area spots or at places where you don't want them to spawn. This however would require some way of finding out if a given spawn location is at such a location.
Currently I don't feel like I would want to squeeze a feature like you suggest it into the shopkeepers plugin, only to imperfectly solve that one special usecase of you. (And you would still have the issue of people losing their shop creation item with this way of doing it.)

        Edited May 21, 2015
commented

Originally closed by blablubbabc (May 21, 2015)

commented

Originally commented by MasterMithrandir (May 21, 2015):

Hmmm allright. I will find an alternative.

As usual, thank you for your assistance :)