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

This commit is contained in:
blablubbabc authored and md_5 committed 2019-02-21 20:29:37 +11:00
1 parent c24abab787
commit 14cd1688da
1 file changed
+2 -1
@@ -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