rosecat-dev / IndividualKeepInv

Server-side Fabric mod that makes keepInventory work on an individual basis.
MIT License
1 stars 3 forks source link

Non-op players cannot set/get their own keepInventory state. #2

Closed Neulooo closed 1 year ago

Neulooo commented 1 year ago

Currently it can only be done by just asking a level-3 operator to manually set their setting, a mild inconvenience for smaller servers, but as the server scales up it just becomes a huge problem. Ideally tho, some sort of permission API could be used to work with LuckPerms.

On that note, it's strange that non-op players can view (with command autocompletion) the entire command chain up to the point where the final decision of said command can be made, theoretically it could be solved by the same permission system.

rosecat-dev commented 1 year ago

Should be functional with 1.0.2. The current implementation does not work if the command is inside a command block but I don't think that's terribly important. Might try and get it working later.

Players can still view the entire command chain (with the exception of default now), but will receive an error message if they attempt to alter/view someone else's state.

Neulooo commented 1 year ago

Does work, thanks.

I'd assume you already know, but the reason it doesn't work in command blocks is it appears that the command's permission level is 3, while command blocks only supports commands with a perm level of <=2.

If I were to be nitpicky about commands though, I feel like the top level command should be named just "keepinv", without the "i" in the beginning, but that's just a flavor thing anyway. If I really wanted I would just modify the source code and compile my own version.