Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by TheBlackTeddy, May 25, 2016.
Use the inventoryopenevent, check if its a merchant inventory and if so cancel it.
Get the holder of the inventory.
It will return an InventoryHolder. Check if the holder is an instance of villager and then if so cast villager to the holder and do what you need to do in order to identify the villager.
Check the online docs: