enable-world-guard-restrictions
blablubbabcDEV opened this issue ยท 17 comments
Migrated from: https://dev.bukkit.org/projects/shopkeepers/issues/280
Originally posted by MasterMithrandir (Dec 25, 2014):
"enable-world-guard-restrictions" configuration option SET TO FALSE no longer functions correctly since the latest WorlgGuard 6.0 update.Trying to set a sign shopkeeper on a world guard protected area will result on a WorldGuard message saying: Hey! Sorry but you can't place things here.
Originally commented by blablubbabc (Dec 26, 2014):
I currently can't test this myself, but:
Setting it to false means that Shopkeepers assumes that you can create a shopkeeper there, without asking WorldGuard first.
So that message you get is purely from WorldGuard and not coming from Shopkeepers.
I assume you are trying to place a sign in a WorldGuard protected region?
If yes, this is blocked by WorldGuard, and there is nothing in Shopkeepers which prevents this as far as I remember.
When you are setting up a sign shop you shouldn't have to place the sign for that yourself: Shopkeepers should place it for you (if there is none yet). So if Shopkeepers places the sign for you it bypasses the WorldGuard protection for you by that.
Originally commented by MasterMithrandir (Dec 26, 2014):
World Guard is the only thing that comes to my mind that could cause this, and the messages are from WG, + the plugin has recently had a massive rewrite to 6.0, it would make sense.
So clicking on walls whith an NPC spawner will result on getting two messages:
-The world guard one: "Hey! Sorry, but you can't place things here"
-And a shopkeepers one (translated to spanish), which basically says that the chest is too far away.
Remember the region I made is a 1x1 area, where only the chest will fit. Once I place a Shopkeeper in SIGN mode, the sign block will have to appear outside the 1x1 buildable area, where building is disabled by another bigger area which covers the whole trading room.
"enable-world-guard-restrictions: false" <Just copied this directly from config as a double check. The sign should appear if Shopkeepers can actually bypass any WG protection.
Originally commented by blablubbabc (Dec 28, 2014):
Hm, I just tried this and I can place the sign shop outside the region where building is denied. I still get the 'Hey, you can't place this here' message of WorldGuard though. But the sign shop is placed nevertheless.
You said you get the 'Chest is too far away' message: that would make sense then, that no shop is created..
Edited Dec 28, 2014
Originally commented by MasterMithrandir (Dec 29, 2014):
I'm going to revise this issue.
Did you make sure there is a 1x1 buildable area where chest is placed, englobed by a non build area? I guess you did...
Maybe I can play whith the wg area priorities?
Or maybe some of my area features are outdated after the 6.0 WG update... I will check this.
Originally commented by MasterMithrandir (Dec 26, 2014):
1.World Guard restrictions is set to FALSE on Shopkeepers plugin.
2.I place an empty chest on a 1x1 world guard protected area, whith build flag ALLOWED.
3.I select a normal selling SIGN SHOP, and click on the chest I placed.
4.Nothing should appear just yet if I'm not mistaken, but I'm already getting that "Hey!" message from WorldGuard, just from trying to select the chest.
5.Clicking again, the sign should be capable of appearing outside the 1x1 world guard protected area (as WG restrictions are False on Shopkeepers). The area surrounding and englobing the 1x1 chest area does not allow players to build.
Therefore, I would say the issue consists in Shopkeepers being unable to bypass the restriction for making the sing appear on a build FALSE area, even though it's properly configured to do so.
Happy holidays! Sorry for the trouble I'm bringing xD
Edited Dec 26, 2014
Originally commented by blablubbabc (Dec 26, 2014):
[at]MasterMithrandir:
Well, you shouldn't get the message from WorldGuard if you really have build flag allowed on that region where the chest is placed.
Shopkeepers doesn't select the chest, if WorldGuard prevents access to that chest.
So no wonder that the sign shop placing afterwards doesn't work as well.. Do you get the 'no chest selected' message when trying to place the sign shop against some wall (by right clicking the wall with the spawn egg)? Or do you get any 'shop creation failed' message, besides the massage from WorldGuard?
Between WorldGuard can not block Shopkeepers from placing that sign in the World. So that is certainly not the issue.
Originally commented by blablubbabc (Dec 29, 2014):
[at]MasterMithrandir:
Try incresing the max distance to at least 2 then. With distance 1 I can only place the sign directly at the chest. With distance 2 I can place it at the blocks around the chest as well.
Originally commented by MasterMithrandir (Dec 29, 2014):
I shouldn't really do that, it's more organized if the chest is right next to the npc...
I'm going to reconfigure the wole trading area, maybe there's something wrong whith the regions.
EDIT: Oh wait, I think I'll give what you just said a try.
Edited Dec 29, 2014
Originally commented by MasterMithrandir (Jan 6, 2015):
I tried on a separate server, and making two simple areas as you did, (a big one whith build allow, and a 1x1 smaller one) has the same positive results.
But somehow, on my more complex server, this is not the case, so I made a video explaining the issue in detail:
https://www.youtube.com/watch?v=Chnw2dBkEdM
If something is not clear, please ask. I'm running out of Ideas on how to solve this.
Originally commented by MasterMithrandir (Dec 29, 2014):
This problem persists, and I can't imagine what could have changed during updates affecting that area besides worlg guard...
Originally commented by blablubbabc (Dec 29, 2014):
[at]MasterMithrandir:
I have created a small region (3x3x256) where I have build permission. I then have created a larger region around that region where I don't have the build permission. I then had to change the priority of the inner region to something higher in order to still be able to build there.
Then I placed the chest there, right clicked it, got the 'You selected a chest' message from shopkeepers, went a few blocks outside the inner region inside the outer region and right clicked a wall: I get the WG message ('You can't do that here') and the sign shop is created nevertheless.
I assume you might not properly have setup the inner region, resulting in chest selection to fail in that inner region.
Edited Dec 29, 2014
Originally commented by MasterMithrandir (Dec 29, 2014):
My inner region is only 1x1 blocks wide, just enough for 1 chest.
The maximum distance the npc can appear from the chest, is set to the minimum. 1 block (I think this is the minumum), this forces the sign to be placed beside the chest, consequently outside the 1x1 buildable area, on a non buildable area.
But what you have done is very similar, and should have the same consequences than in my case.
I tried setting the inner region priority to 2, but it was no use for the sign shop to appear.
I could already place a chest when it was just priority 1.
This was working perfectly before updating some plugins, server and worldguard.
It suddenly stopped working after updates. No region changes where made.
Still investigating...
Originally commented by blablubbabc (Jan 7, 2015):
[at]MasterMithrandir:
Please try with v1.42. I added some (dirty) workaround but should hopefully work nevertheless: Basically it now calls another click event if the first one on the chest was cancelled, but removing the shop creation item in the players hand (and adding it back it right afterwards). If that second click event gets blocked as well, we can be sure that it is because the player doesn't have access to the chest.
Edited Jan 7, 2015
Originally commented by MasterMithrandir (Jan 7, 2015):
I can confirm this whole issue is fixed whith your latest dirty fix :P
Thanks a lot :D
Originally commented by blablubbabc (Jan 6, 2015):
[at]MasterMithrandir:
I know what the issue is:
The problem is not placing the sign but it is selecting the chest. Once you have selected the chest you can place the sign wherever you want regardless of world guard protections (in the configured radius of course).
Now the reason why the chest cannot be selected from the front is indeed because of WorldGuard: WorldGuard denies the click event because the player does not have the permission to spawn a villager with a spawn egg there (at the block in front of the chest, in that outer region). However on the side of the chest (in that 1x1 region) WorldGuard is not blocking this mob spawning via the spawn egg (shopkeepers however is, because you selected a chest with that click).
Now the reason why shopkeepers is not simply ignoring WorldGuard blocking the click event is because we want that you can only select a chest to which you have access to. The plugin logic is as follows: 'If the click event on that chest is not blocked, the player could open the chest, this means he has access to that chest.'
It is unfortunate now that WorldGuard blocking the click event because it wants to deny the usage of the spawn egg causes shopkeepers to think that you don't have access to the chest, and therefore does not select it..
I am still thinking about how this could be best fixed..
Edited Jan 6, 2015
Originally commented by MasterMithrandir (Jan 6, 2015):
Actually I just noticed you can place the sign if you select the chest by clicking it on one of it's sides as you said, but through the very small slits between the chest and the bedrock xD (without need of removing bedrock)
This is rather unconfortable and strange...
I really hope you can come up whith a fix, thanks again blablubbabc.