--- a/net/minecraft/world/item/trading/Merchant.java
+++ b/net/minecraft/world/item/trading/Merchant.java
@@ -10,6 +10,7 @@
 import net.minecraft.world.item.ItemStack;
 
 public interface Merchant {
+
     void setTradingPlayer(@Nullable Player customer);
 
     @Nullable
@@ -19,6 +20,7 @@
 
     void overrideOffers(MerchantOffers offers);
 
+    default void processTrade(MerchantOffer merchantRecipe, @Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { this.notifyTrade(merchantRecipe); } // Paper
     void notifyTrade(MerchantOffer offer);
 
     void notifyTradeUpdated(ItemStack stack);
@@ -36,18 +38,21 @@
     }
 
     default void openTradingScreen(Player player, Component name, int levelProgress) {
-        OptionalInt optionalInt = player.openMenu(
-            new SimpleMenuProvider((syncId, playerInventory, playerx) -> new MerchantMenu(syncId, playerInventory, this), name)
-        );
-        if (optionalInt.isPresent()) {
-            MerchantOffers merchantOffers = this.getOffers();
-            if (!merchantOffers.isEmpty()) {
-                player.sendMerchantOffers(
-                    optionalInt.getAsInt(), merchantOffers, levelProgress, this.getVillagerXp(), this.showProgressBar(), this.canRestock()
-                );
+        OptionalInt optionalint = player.openMenu(new SimpleMenuProvider((j, playerinventory, entityhuman1) -> {
+            return new MerchantMenu(j, playerinventory, this);
+        }, name));
+
+        if (optionalint.isPresent()) {
+            MerchantOffers merchantrecipelist = this.getOffers();
+
+            if (!merchantrecipelist.isEmpty()) {
+                player.sendMerchantOffers(optionalint.getAsInt(), merchantrecipelist, levelProgress, this.getVillagerXp(), this.showProgressBar(), this.canRestock());
             }
         }
+
     }
 
     boolean isClientSide();
+
+    org.bukkit.craftbukkit.inventory.CraftMerchant getCraftMerchant(); // CraftBukkit
 }
