Skip to content

Commit

Permalink
Config#getKeys now works with parent key
Browse files Browse the repository at this point in the history
  • Loading branch information
xDec0de committed Nov 1, 2024
1 parent eba5496 commit c1af52c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions shared/src/main/java/net/codersky/mcutils/storage/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ default Set<String> getKeys() {
}

@NotNull
default Set<String> getKeys(@NotNull Predicate<String> filter) {
return MCCollections.clone(getKeys(), filter);
default Set<String> getKeys(@NotNull String parent) {
return getMap().getKeys(parent);
}

default boolean containsKey(@NotNull String... keys) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public Set<String> getKeys() {
}

@NotNull
public Set<String> getKeys(@NotNull String key) {
final Map<String, Object> source = getNestedMap(key, false);
public Set<String> getKeys(@NotNull String parent) {
final Map<String, Object> source = getNestedMap(parent, false);
return source == null ? Set.of() : source.keySet();
}

Expand Down

0 comments on commit c1af52c

Please sign in to comment.