Posted October 12, 20213 yr Is there a forge event for successful trading with a villager? I searched but did not find anything similar
October 12, 20213 yr Author @Luis_ST I want that when a player buys my item from a merchant, the villager is destroyed
October 12, 20213 yr a idea not sure if it's work but you can register an AdvancementListerner to the Player in PlayerLoggedInEvent to the villager_trade AdvancementTrigger, then you need a bit logic inside the Listener to get the Villager with which the player trades (you can get from the World all Villager in a area then check if the trading player which is store in the Villager is the same player) and a you need to check if the player was trading with your trade after a successful tests you can remove the Villager
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.