mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 18:48:20 +08:00
feat(list): 添加快速获取副本列表的方法
This commit is contained in:
@@ -65,6 +65,10 @@ public class ConfiguredList<V> extends CachedConfigValue<List<V>> implements Lis
|
||||
return get().get(index);
|
||||
}
|
||||
|
||||
public @NotNull List<V> copy() {
|
||||
return new ArrayList<>(get());
|
||||
}
|
||||
|
||||
public <T> @NotNull T handle(Function<List<V>, T> function) {
|
||||
List<V> list = get();
|
||||
T result = function.apply(list);
|
||||
|
||||
Reference in New Issue
Block a user