From 817d83e1bbea2f960b65943c637dc3f089c9df63 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 21 May 2019 12:09:42 +1000 Subject: [PATCH] SPIGOT-4968: Jukebox.setPlaying(null) causes error By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/CraftEffect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEffect.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEffect.java index c6edd7a507..8345587b5e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEffect.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEffect.java @@ -20,7 +20,7 @@ public class CraftEffect { datavalue = ((Potion) data).toDamageValue() & 0x3F; break; case RECORD_PLAY: - Validate.isTrue(((Material) data).isRecord(), "Invalid record type!"); + Validate.isTrue(data == Material.AIR || ((Material) data).isRecord(), "Invalid record type!"); datavalue = Item.getId(CraftMagicNumbers.getItem((Material) data)); break; case SMOKE: