Shopkeepers

Shopkeepers

2M Downloads

Player cannot set shop. (Add remove commands)

blablubbabcDEV opened this issue · 9 comments

commented

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

Originally posted by MasterMithrandir (Mar 2, 2015):

This is an old issue on my server, which I may have already reported, and even suggested a workaround for it, which was denied and I will re-mention at the end of this ticket.The issue:
One of my players (Zirix) has recently been trying to create a player shopkeeper, but he can't, because the plugin tells him he already has a shopkeeper. (There's a 1 shopkeeper limit per player)When I check Zirix's shop in the save.yml I see he has a shop:'86':
  uniqueId: 9dc5d132-b8a2-42aa-b645-64f05ebd0509
  world: PVP-EVENT
  x: 403
  y: 69
  z: 1578
  type: player
  object: cow
  uuid: fe8df365-e12e-4de6-9332-6c998a0375fd
  owner uuid: 813669d9-f501-32b2-a669-1009b5432477
  owner: zirix
  chestx: 403
  chesty: 69
  chestz: 1577
  forhire: false
  costs: {}Now I know I could just delete his shop from the save, and problem solved. But that isn't at all practical, and It happens too much often for this correction to be done constantly.
I go to the coordinates and world, where the shop is, and find that there is another shop in the same place (sign shop made by another player in the trading center slots I made) right where his shop should be, which does not belong to Zirix.
I check the coordinates on save.yml, and find that indeed, there are two shops whith the exact same coordinates.
The object for Zirix's shop is a Cow entity which cannot be seen, because mobs and animals are blocked from spawning in this world guard area.Therefore, Zirix has his shop creating hability blocked, as he already has a shop, but the shopkeeper cannot spawn due to area restrictions.The trading center was designed for players to only place Signs as NPC shopkeepers, but sometimes players can make a mistake, and place an entity instead, which results in a huge mistake that makes their shops useless.I also think (allthough I am not sure) that sometimes shops get stuck, without the need for the shop type to be an entity (in cases such as removing the shop whith unusual methods), which results in the same consequences: The player gets his shop blocked.This issue could EASILY be solved, If a simple shop removal command existed for removing shops. This command would provably have to remove all shops related to a player, due to the dificulty of removing a specified ammount or specific shop name (last case in which it would be impossible to remove his shop, as Zirix's shop doesn't have a name because he couldn't even edit it through the Shopkeeper entity.), according to the shopkeeper ammount limit on config, example: Removing all own shops: /shopkeepers remove
Removing all shops from another player: /shopkeepers remove Each of these commands would have a permission. I could just give the first command to normal players, and they could "fix" their shops each time this happens.

commented

Originally commented by MasterMithrandir (Mar 2, 2015):

Oh, I'm sorry, I musn't have made clear that I blocked entities from spawning on purpose.
I only want sign shops in that area, I had entities in the past, and they have some very laggy effect when players get near too many of them. I always recieved complaints, but since I made the area Sign Shop Only, there hasn't been any lag + it's much more tidy.
By blocking entities, we could say I am causing this issue myself, but as I said, I think this doesn't always occur when players set entities as shopkeepers on that area, I think it sometimes also occurs when deleting the shop. (The shop somehow doesn't delete properly)
In any case, If you add the requested commands, there will be no trouble for players who constantly tell me that their shop is broken.
About the chest in this case: I am pretty sure both shops where using the same chest coordinates on save.yml, allthough I can't confirm it, as I have already manually deleted Zirix's chest.
About the banner: I'll do my best, If you don't like it, don't feel bad about not using it.

commented

Originally commented by blablubbabc (Mar 3, 2015):

[at]MasterMithrandir:
Well, it would probably be more straight-forward to try to block players from creating non-sign shopkeepers in that region, rather than working around the issues that arise from only blocking the entity spawning..
So it might make more sense to instead temporary remove the entity-shopkeeper permissions from the players in the shop-region. Not sure if there is a plugin for that already, you could take a look at the 'transient groups' feature for this plugin: http://dev.bukkit.org/bukkit-plugins/rsp-region-specific-permissions/

commented

Originally commented by MasterMithrandir (Mar 3, 2015):

Interesting plugin. I could use it, but It might still be an incomplete solution, and relying on aditional plugins is always a burden. I always try to reduce my ammount of plugin usage.
As I said, entity shopkeepers may not be the only cause for this issue.
I would really appreciate if you added shop removal commands, just to avoid any issues whith stuck shops. It still is understandable if you do not wish to add these, but I really do think they would be a benefiting feature for the Shopkeepers plugin.

commented

Originally commented by MasterMithrandir (Mar 2, 2015):

I am willing to make a banner/logo for the Shopkeepers plugin in exchange for your extensive help on my issues. Especially if you solve this one :P
Here's an example of one I made for the Marriage Master plugin:
http://dev.bukkit.org/bukkit-plugins/marriage-master/
If you guys like it, I can make you a cool original drawn logo for Shopkeepers :) In fact, I'll provably do it anyway as long as you promise to use it.

        Edited Mar 2, 2015
commented

Originally commented by blablubbabc (Mar 2, 2015):

I currently see no issue with adding those commands.

However, I am wondering why WorldGuard is blocking the shopkeeper entity spawning. Have you enabled the bypass-spawn-blocking in the config?
Also, the chest should be a different as there can't be 2 player shopkeepers which use the same chest.
Regarding the banner: If the banner works out well, I would love to use it.

        Edited Mar 3, 2015
commented

Originally commented by MasterMithrandir (Mar 6, 2015):

Seems to work fine. Will report if I encounter any issues.
Thanks :)

commented

Originally closed by blablubbabc (Mar 4, 2015)

commented

Originally commented by blablubbabc (Mar 3, 2015):

[at]MasterMithrandir:
I am gonna add those commands nevertheless. I am just saying that I would try to solve this differently, for convenience. It is not very intuitive for the players to be able to create the entity shopkeeper, but then not being able to see them, and then having to know about these new commands in case they run into issues..
Quote:As I said, entity shopkeepers may not be the only cause for this issue.

Well, I can only fix what I know of. Once it is more clear what those other causes are, I can fix those as well.

commented

Originally commented by blablubbabc (Mar 4, 2015):

[at]MasterMithrandir:
Check out v1.48. Please test that all permission nodes are working correctly before using, because the remove command is dangerous.