ChestShop (iConomyChestShop)

ChestShop (iConomyChestShop)

6M Downloads

Option to not allow trading with own shop when /csaccess is toggled.

JeremyLugo opened this issue ยท 7 comments

commented

Plugin Version

3.11 (build213)

Plugin Config

https://hastebin.com/lehujojalo.makefile

Server Version

1.16 spigot

Server Log

pretty much the only line that matters, no stack traces anyways:
[10:47:15] [Server thread/INFO]: [ChestShop] FoodCans bought 1 Diamond for 100.00 from FoodCans at [world] -91, 64, 79

What other plugins are you running?

Plugins (22): LuckPerms, Factions, PlaceholderAPI, UltimateTimber, AdvancedNMotd, WitherAC, LoginDeop, Vault, ProtocolLib, LibsDisguises, WorldEdit, Essentials, PhantomEconomy, AdvancedBan, HolographicDisplays, EssentialsSpawn, WorldGuard, ChestShop, VanishNoPacket, LocketteX, DiscordSRV, ChatControl

What is happening?

I can buy from my own shop.

What did you expect to happen?

I expected the chest shop to open when i click the sign of my own shop, but instead it buys from the shop.

Additional context

I have chestshop.* permission.

https://imgur.com/a/cP1GKpB

commented

Please provide your full server log as well as a screenshot of the shop sign in question.

commented

I think I see what your issue is, you are using /csaccess beforehand which by design allows trading at any shop that you have access to and normally shouldn't be allowed to trade with. This includes your own shops.

If I test that without special permissions then the chest opens like expected. Please make sure to test with normal player permissions.

commented

I'm not able to buy from any chest at all unless I do /csaccess because it just opens the chest instead of buying from it. that's the only reason I do it. I just removed the .* permission and relogged in, didn't have to do /csaccess to buy from shops anymore but I can still buy from my own chest. I also was not Opped during any of this.

commented

Well first: Access toggling is not removed on relog, please make sure it was disabled before. If it still acts strangely (which it doesn't when I test it with a completely untouched permissions setup) then please post the output of the verbose mode when you try to trade with the shop as a normal player without any special permissions nor op.

commented

I just tested with normal permissions, and it works after restarting the server so no csaccess was toggled. But for my certain players that do have extra permissions, they can't buy from any shops unless they do /csaccess which also lets them buy from their own shops.

commented

Either don't give them permission to access other shops or don't give permissions to use /csaccess. If you trust them enough to access other players shops then you should trust them enough to not abuse whatever special mechanic you have in place for trades that you don't want to happen with their own shops, no? (Besides the fact that you could easily punish them as all transactions get logged) So I personally don't see any reason to make that (admin) command more difficult than it needs to be but I'm open to PRs I guess if someone wants to take a shot.