Skip to content

Commit

Permalink
removed deprecated annotation and added new annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Funboyy authored Jun 1, 2024
1 parent 2fc9b1b commit 12c11c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/pages/addon/features/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can create sections in your settings; you just have to add the annotation `@

If you want more structure in your settings but don't want to use Sections, you can create sub-settings that can be accessed via a button. Just create a new class, and let it inherit from `Config`. Add a field with the same type in your configuration (just the type, not a `ConfigProperty`) and create a new instance of said class. You might have noticed that you don't have to use the `AddonConfig` superclass for sub-settings. The `AddonConfig` class is required for your main configuration but not for sub-settings.

If you want to display more than just the advanced button (the button that lets you access the sub-settings), add the `@ParentSwitch` annotation to the most important switch in your sub-settings.
If you want to display more than just the advanced button (the button that lets you access the sub-settings), add the `@ShowSettingInParent` annotation to the most important switch in your sub-settings.

### Use Icons for Settings

Expand Down Expand Up @@ -164,7 +164,7 @@ These are some example files showing a few of the functions mentioned before.
``` java
public class ExampleSubSettings extends Config {

@ParentSwitch
@ShowSettingInParent
@SpriteSlot(x = 7)
@SwitchSetting
private ConfigProperty<Boolean> enabled = new ConfigProperty<>(true);
Expand Down Expand Up @@ -303,4 +303,4 @@ todo: write, check chattime

### Create Custom Setting Widgets

todo: write, check chattime
todo: write, check chattime

0 comments on commit 12c11c3

Please sign in to comment.