BlockProt

BlockProt

17.2k Downloads

[Bug]: Users unable to access inventories always as it is random.

ClikMazer opened this issue ยท 9 comments

commented

Version of BlockProt

v1.1.0 - Spigot Plugin

Description of the bug

I have set permissions using luckyperms which also uses perms from essentialsX on a 1.19 server. I have followed the plugin instructions and still have the problem. I have 3 ranks, default, mod, and admin. The only permissions from the blockprot are .lock and .info which is given to the default account which all 3 ranks inherit. I am admin but do not have the blockprot .admin or.bypass. No one has these permissions. I am able to access chest and furnaces that are not locked but other people with the exact same chest cannot access it. It will force close the inventory if they touch the inventory of the chest or their own inventory.

This happens with pre-generated chest and chest placed manually. It is very random per player/per inventory when this happens. Is this a known issue or a fix for this?

Would love to keep this plugin on the server but cannot keeps spending 5-15 minutes trying to fix it with each user that gets on the server.

Steps to reproduce

  1. I am admin rank on my server but do not have op and inherit .lock and .info
  2. I have another player who is default rank which has .lock and .info as well
  3. The chest is unlocked but they cannot access their inventory or the chest inventory as it will force close the chest
  4. If they lock it, sometimes they have the same issue but after about 60 seconds it all of a sudden works.
  5. Breaking the chest will fix it for the individual for about 30 seconds and then the same issue happens. Again, it is random as when it works or not.
  6. I rarely run into this issue with my own chest but do not have any advanced permissions that would be helping me have advantage which is the confusing part.
  7. For this plugin, we all have the same exact permissions.

Additional context

No response

commented

When you say that the inventories "force close", is there perhaps an exception or error in the console?

I'm quickly going to boot up my server and see if I can somehow reproduce.

Thanks for reporting and I'm terribly sorry you're having this issue, it seems to be something that has changed with 1.19 that I didn't catch before releasing.

commented

I think I have figured out the issue at hand here. Blocks that have the public added to them seem to glitch out because the public seems to have higher precedence in checks than the owner... Will look at the code to figure out where and why this happens exactly. But yeah, seems quite random and annoying. Sometimes it works on all blocks, sometimes it works on none, very weird.

commented

Also, if the is player is detected to not have read permissions, it will instantly close the inventory. added this bug with f4ebeb2. Though I think I fixed it now.

Here is a updated plugin if you want to test it for yourself:
blockprot-spigot-1.1.0-all.jar.zip

commented

I have added the updated plugin and have tested it with my alt account and it seems to work perfectly now. The only thing I noticed is if you make a chest useable by the public, you have to click the public again, and go through all the permissions until you get back to read/write where it starts or it will not work. This could of been a 1 time thing but I experienced this when trying it for the first time.

Thank you so much for fixing this so fast as it was almost driving me insane on why it was not working half the time.

I have not tried yet with other players so will let you know if issues occur.

Great plugin!

commented

So the problem is still persisting and I think I narrowed down a trial.
If you find a randomly generated chest, it will not be locked so anyone can access it. After the first person accesses it, it no longer will allow anyone to access it and forces the inventory closed with no error messages in console but the first person can edit contents. Users can still lock it in order to claim it and then edit it but seems like a hassle.

Seems like the user is claiming the chest just by opening it once but just leaving it as unlocked so no other users can edit the chest. They have permission to open it if it is not locked but will force close their inventory if try to modify.

If you need any other information, please let me know. Thanks

commented

Hmm interesting, I'm really baffled as to what might cause this. This is a wild guess but would you want to try this? I changed a small thing that checks if the block is protected by anyone or not... doubt this will fix it entirely though.
blockprot-spigot-1.1.0-all.jar.zip

commented

I have added this plugin version and it no longer is causing the issue. I will let you know after more testing though because I am using the same exact chest as tested before. I will try to find one and let you know. Thanks in advance.

commented

After further testing with multiple individuals, it seems to be working as I would like and intended. Whatever you did fixed the issue we were having. Thank you so much for your fast fixes.

commented

Ok good to hear. I will push the fix then and please report if it still doesn't work 100% as intended. Thanks for your cooperation!