Carpenter's Blocks

Carpenter's Blocks

24M Downloads

[Bug] Logic fault in hasElevatedPermission method

mskurnik opened this issue ยท 4 comments

commented

There seems to be a logic fault in your hasElevatedPermission method if FeatureRegistry.enableOwnership is set to false then non-ops cannot edit blocks.

commented

I can't get around to testing it at the moment, but 63bf29b may resolve this issue.

commented

Seems fine. Check here and see if I am missing something: https://github.com/Mineshopper/carpentersblocks/blob/master/src/main/java/com/carpentersblocks/util/protection/PlayerPermissions.java#L38

I did refactor some of this code towards the end of 3.3.7 development, so it may have been fixed already.

commented

If you look at the method, there is no check for if FeatureRegistry.enableOwnership is false. You are returning false right now if FeatureRegistry.enableOwnership is false and the user is not an op. Setting ownership back to true in the config allows non-op users to place items in the blocks again.

commented

I think I see what you mean. The code was changed to fix some odd behavior but ended up forcing block ownership rules. I will have to move some things around to resolve this.