Improve Registry

This commit is contained in:
Jake Potrebic
2023-12-20 02:03:05 -08:00
parent a264c42314
commit 5b1ab02f39
9 changed files with 24 additions and 5 deletions

View File

@@ -64,6 +64,7 @@ public class CraftSound implements Sound, Handleable<SoundEvent> {
@NotNull
@Override
public NamespacedKey getKey() {
if (true) return java.util.Objects.requireNonNull(org.bukkit.Registry.SOUNDS.getKey(this), () -> this + " doesn't have a key"); // Paper
return this.key;
}