Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot 2019-02-21 03:06:11 +01:00
parent 961fc0efe5
commit 4d93e94dbd

View file

@ -17,7 +17,8 @@ public class CraftInventoryMerchant extends CraftInventory implements MerchantIn
@Override
public MerchantRecipe getSelectedRecipe() {
return getInventory().getRecipe().asBukkit();
net.minecraft.server.MerchantRecipe nmsRecipe = getInventory().getRecipe();
return (nmsRecipe == null) ? null : nmsRecipe.asBukkit();
}
@Override