mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
#1058: Add tests for Minecraft registry <-> Bukkit fields
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package org.bukkit;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -45,11 +44,6 @@ public abstract class MusicInstrument implements Keyed {
|
||||
|
||||
@NotNull
|
||||
private static MusicInstrument getInstrument(@NotNull String key) {
|
||||
NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
|
||||
MusicInstrument instrument = Registry.INSTRUMENT.get(namespacedKey);
|
||||
|
||||
Preconditions.checkNotNull(instrument, "No MusicInstrument found for %s. This is a bug.", namespacedKey);
|
||||
|
||||
return instrument;
|
||||
return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user