Heads up!
Added in Fzzy Config 0.4.0
These two annotations work together to define permissions based on the LuckPerms/Forge Config API "node" style. Permissions attached to a specific setting will take precedence over those for the entire class.
@WithCustomPerms
- All the node strings that are permissible for a setting or class; generally only the lowest level node(s) would be needed, "admin" isn't needed if it inherits everything from "mod", and "mod" is permissible. Optionally a vanilla permission level can be provided as a fallback.@AdminLevel
- Defines who should be alerted in case of an access violation; only "admin" might be included, not "mod". If this annotation is not provided, Fzzy Config will alert anyone with vanilla permission level >= 3
@AdminAccess(perms = {"permissions_example.admin"}, fallback = 3) // defines the permission nodes that are alerted of an access violation; falls back to vanilla admin or higherpublic class MyConfig extends Config {//constructor goes here@WithCustomPerms(perms = {"permissions_example.moderator", "permissions_example.temporary_admin"}, fallback = 3) // permission nodes that have access to this setting (along with any inheriting nodes). Falls back to anyone with vanilla admin access or higher.public int mySpecialField = 2;}
Heads up!
See the documentation page here 🗗