Improve Registry#getOrThrow messages

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2024-09-27 08:21:32 +10:00
parent eb72b9d8a3
commit 0278929667

View File

@ -284,7 +284,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
public B getOrThrow(@NotNull NamespacedKey namespacedKey) {
B object = get(namespacedKey);
Preconditions.checkArgument(object != null, "No registry entry found for key " + namespacedKey);
Preconditions.checkArgument(object != null, "No %s registry entry found for key %s.", minecraftRegistry.key(), namespacedKey);
return object;
}