Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Villager Trading GUI #76

Open
Appliedtrout opened this issue Mar 18, 2024 · 1 comment
Open

Villager Trading GUI #76

Appliedtrout opened this issue Mar 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Appliedtrout
Copy link

Could you please add the option to use a Villager Trading GUI? This would be extremely helpful for me and other players.

@BlitzOffline
Copy link
Member

This is a great idea but will require much work as Merchant inventories are very different from other inventory types. If anyone has the time to look into this, here are some starting points:

  1. A Merchant entity needs to be created: https://helpch.at/docs/1.14.4/org/bukkit/inventory/Merchant.html.
  2. Recipes (aka the trading inventory) need to be created: https://helpch.at/docs/1.14.4/org/bukkit/inventory/MerchantRecipe.html
  3. These recipes need to be given to the Merchant: https://helpch.at/docs/1.14.4/org/bukkit/inventory/Merchant.html#setRecipes-java.util.List-
  4. A trade needs to be open between the player and the Merchant: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/HumanEntity.html#openMerchant(org.bukkit.inventory.Merchant,boolean)

Something to note, DeluxeMenus supports Minecraft 1.14.4 and higher so the changes will have to work on all these versions if possible. If not, they could be disabled on lower versions but the plugin still needs to work on those versions.

@BlitzOffline BlitzOffline added the enhancement New feature or request label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants