mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 00:17:58 +01:00
Use for-each
This commit is contained in:
parent
18058bc3c8
commit
36f3355a12
@ -83,11 +83,11 @@ public final class Registry {
|
||||
@ApiStatus.Internal
|
||||
public Container(Resource resource, Loader<T> loader) {
|
||||
final JsonObject objects = Registry.load(resource);
|
||||
objects.entrySet().forEach(entry -> {
|
||||
for (var entry : objects.entrySet()) {
|
||||
final String namespace = entry.getKey();
|
||||
final JsonObject object = entry.getValue().getAsJsonObject();
|
||||
loader.accept(this, namespace, object);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public T get(@NotNull String namespace) {
|
||||
|
Loading…
Reference in New Issue
Block a user