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