mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 13:12:03 -07:00
#893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import java.lang.reflect.Proxy;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Stream;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
@@ -87,7 +88,7 @@ public final class TestServer implements InvocationHandler {
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterator iterator() {
|
||||
return null;
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -95,6 +96,12 @@ public final class TestServer implements InvocationHandler {
|
||||
public Keyed get(@NotNull NamespacedKey key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Stream stream() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user