---
title: "@WithCustomPerms and @AdminLevel"
---

<Callout>
Added in Fzzy Config 0.4.0
</Callout>

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.
1. `@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.
2. `@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

<CodeTabs>

```java !!tabs Java
@AdminAccess(perms = {"permissions_example.admin"}, fallback = 3) // defines the permission nodes that are alerted of an access violation; falls back to vanilla admin or higher
public 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;
}
```

```kotlin !!tabs Kotlin
@AdminAccess(["permissions_example.admin"], 3) // defines the permission nodes that are alerted of an access violation; falls back to vanilla admin or higher
class MyConfig: Config(Identifier.of("my_id")) {

    @WithCustomPerms(["permissions_example.moderator", "permissions_example.temporary_admin"], 3) // permission nodes that have access to this setting (along with any inheriting nodes). Falls back to anyone with vanilla admin access or higher.
    var mySpecialField = 2
}
```

</CodeTabs>

<Callout>
See the documentation page <a target="_blank" rel="noopener" href="https://fzzyhmstrs.github.io/fconfig/-fzzy%20-config/me.fzzyhmstrs.fzzy_config.annotations/-with-custom-perms/index.html">here 🗗</a>
</Callout>