diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java index 4deedd6193..d79300262e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java @@ -35,11 +35,11 @@ public class CraftBeaconView extends CraftInventoryView impleme @Override public void setPrimaryEffect(@Nullable final PotionEffectType effectType) { - container.setData(TileEntityBeacon.DATA_PRIMARY, ContainerBeacon.encodeEffect(CraftPotionEffectType.bukkitToMinecraftHolder(effectType))); + container.setData(TileEntityBeacon.DATA_PRIMARY, ContainerBeacon.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType))); } @Override public void setSecondaryEffect(@Nullable final PotionEffectType effectType) { - container.setData(TileEntityBeacon.DATA_SECONDARY, ContainerBeacon.encodeEffect(CraftPotionEffectType.bukkitToMinecraftHolder(effectType))); + container.setData(TileEntityBeacon.DATA_SECONDARY, ContainerBeacon.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType))); } }