Close any open inventories before showing shapeless recipes (#5122)

This commit is contained in:
MD 2022-10-02 23:43:13 +01:00 committed by GitHub
parent 0ca58ce4ba
commit 28d7abe642
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ public class Commandrecipe extends EssentialsCommand {
final List<ItemStack> ingredients = recipe.getIngredientList();
if (showWindow) {
final User user = ess.getUser(sender.getPlayer());
user.getBase().closeInventory();
user.setRecipeSee(true);
final InventoryView view = user.getBase().openWorkbench(null, true);
for (int i = 0; i < ingredients.size(); i++) {