A land claiming mod that allows users to claim land to protect your home from thieves, bandits and monsters, and admins to claim land with region flags and advanced protection!
MIT License
21
stars
8
forks
source link
[Bug]: /claim settings is tied to same Prometheus permissions as bypassing claims. #26
Players are unable to use /claim settings to modify the settings of their personal claims as stated by the Cadmus documentation. After doing some digging into the code, I believe this is because the commands are coded to use the same permissions.
This means that a player can only set a claim setting if they have permission to access all claims.
How to Reproduce?
Ensure you do not have a Prometheus role with any cadmus permissions.
Attempt to modify a setting using /claim settings.
Notice that you get the "You are not allowed to manage this setting." message.
Expected Behavior
I would have expected players to be able to edit their claim settings, as mentioned in the documentation.
Version
1.0.2
Mod Loader Version
1.20.1 - 47.1.0
Mod Loader
Forge
Logs or additional context
No response
Code of Conduct
[X] I have searched the issue tracker and confirmed that the issue has not been reported
[X] I have checked the FAQ (if one is present) and my issue is not listed
[X] I have verified that I am using the latest version of the mod
[X] I have verified that I have installed all the required dependencies for the mod
[X] I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
Bug Description
Players are unable to use /claim settings to modify the settings of their personal claims as stated by the Cadmus documentation. After doing some digging into the code, I believe this is because the commands are coded to use the same permissions.
For example, for the
canBreak
setting in commands, it uses theBLOCK_BREAKING
permission: https://github.com/terrarium-earth/Cadmus/blob/92466a96c0fe695de919d024731f1b730e5b5591/common/src/main/java/earth/terrarium/cadmus/common/commands/claims/ClaimSettingsCommand.java#L55Which also happens to be the permission for whether a player can break blocks in a claim: https://github.com/terrarium-earth/Cadmus/blob/92466a96c0fe695de919d024731f1b730e5b5591/common/src/main/java/earth/terrarium/cadmus/common/claims/ClaimApiImpl.java#L53
This means that a player can only set a claim setting if they have permission to access all claims.
How to Reproduce?
Expected Behavior
I would have expected players to be able to edit their claim settings, as mentioned in the documentation.
Version
1.0.2
Mod Loader Version
1.20.1 - 47.1.0
Mod Loader
Forge
Logs or additional context
No response
Code of Conduct