Hello, I've seen a server with villagers but they have a Villager ui not a normally one with FormAPI i was wondering if there is any api or way to create one?
Yes, its simple to create, so there is a lot ways to do it, first way: you need to complete a hard missions (Joke Lol) but in second way: you need to create it in EntityDamageByEntity.
also you can spawn Villager entity owne your self and use some thing like this : PHP: //for example you spawned an entity Villager with (Villager) nameif ($event->getEnetity() instanceof Villager) {//its for dont damage villager when you click on it.$event->setCancelled(true);$this->openTradeForm($event->getPlayer());//its for opening forms when you click on Villager//you need to create a function called OpenTradeForm(Player $player) {//here is for buttons and more}//also its better to use EntityDamage like:if ($event->getEntity() instanceof Villager) {$event->setCancelled(true);// its for when player wants to greif or kill villager with lava or fire XD}} and its done.
also you can spawn a entity (with spaller) and set your sking to Villager and dispatchcommand XD its simple way.
its example, if you dont know how to use api, you should first learn php, then asking here, and im for this just sent Code and my own idea to do that, there is more than 10 way to create this plugin in my mind and i told 3 of 10 my ideas to him/her