#1475: Add tests for Minecraft registry <-> Bukkit fields
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -279,6 +279,16 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
return bukkit;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public B getOrThrow(@NotNull NamespacedKey namespacedKey) {
|
||||
B object = get(namespacedKey);
|
||||
|
||||
Preconditions.checkArgument(object != null, "No registry entry found for key " + namespacedKey);
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Stream<B> stream() {
|
||||
|
||||
Reference in New Issue
Block a user