split direct holder support up from ctor accepting Holder
Enchantment shouldn't support direct holders despite the ctor accepting a Holder type. We want to limit the types to ones that are actually used as direct holders in the game
This commit is contained in:
@@ -32,7 +32,7 @@ public class CraftMusicInstrument extends MusicInstrument implements io.papermc.
|
||||
public static Object bukkitToString(MusicInstrument bukkit) { // Paper - switch to Holder
|
||||
Preconditions.checkArgument(bukkit != null);
|
||||
|
||||
return ((CraftMusicInstrument) bukkit).toBukkitSerializationObject(Instrument.CODEC); // Paper - switch to Holder
|
||||
return ((CraftMusicInstrument) bukkit).toBukkitSerializationObject(Instrument.DIRECT_CODEC); // Paper - switch to Holder
|
||||
}
|
||||
|
||||
public static MusicInstrument stringToBukkit(Object string) { // Paper - switch to Holder
|
||||
|
||||
Reference in New Issue
Block a user