How can I send the form to the player?
SamuelPozzobon opened this issue · 8 comments
SamuelPozzobon commented
How can I send the form to the player?
SamuelPozzobon commented
This is EntityDamageByEntity event:
if($npc instanceof Quake){
$event->setCancelled(true);
$form = new DialogForm("Quake");
$form->addButton(new Button("Coming Soon", function(Player $player) {
$player->sendMessage("Coming soon...");
}));
$form->setCloseListener(function(Player $player) {
$player->sendMessage("You closed the form!");
});
$form->pairWithEntity($npc);
}
When I hit the entity it doesn't show up the form
dresnite commented
Hi! Try to right click (or hold an entity in the mobile edition) instead, the form should show up.
SamuelPozzobon commented
Ah I tried, it works but the entity is bugged on the form
dresnite commented
Can you show me how it looks like?
SamuelPozzobon commented
dresnite commented
Yeah, that's a client-side issue, it only happens with the Human entities for some reason.
SamuelPozzobon commented
F
SamuelPozzobon commented
Thanks for your time!