Skip to content

Commit

Permalink
Added function to check whether config value being set is valid.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieweke committed May 30, 2024
1 parent 4f7c086 commit 7196c02
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/bothq/lib/plugin/config/IConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ default boolean isEnabled(long serverId){

IConfigGroup addConfigGroup(String uniqueId, String displayName);



}
2 changes: 2 additions & 0 deletions src/main/java/com/bothq/lib/plugin/config/IConfigGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
public interface IConfigGroup extends IConfigurable, INameable {
List<IConfigurable> getChildren();


ICheckBox addCheckBox(String uniqueId, String displayName, boolean defaultValue);

IComboBox addComboBox(String uniqueId, String displayName, List<String> elements, String defaultValue);
Expand All @@ -16,4 +17,5 @@ public interface IConfigGroup extends IConfigurable, INameable {
ISlider addSlider(String uniqueId, String displayName, float minValue, float maxValue, float step, float defaultValue);

ITextBox addTextBox(String uniqueId, String displayName, String defaultValue);

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ public interface IComponent<T> extends IConfigurable, INameable {
T getValue();

void setValue(T value);

boolean isAssignable(Object value);
}

0 comments on commit 7196c02

Please sign in to comment.