-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I used the same method to test a dialog, but when I try to close it, nothing happens. I noticed that it only closes after I click the button. If I don’t click the button, it closes normally.
$dialogue = NpcDialogueBuilder::create()
->setName("Dialogue Name")
->setText("This is an example dialogue.")
->setDefaultNpcTexture(DefaultNpcDialogueTexture::TEXTURE_NPC_10)
->addSimpleButton("Okay")
->addSimpleButton("Whatever", function(Player $player) : void{
$player->sendMessage("You clicked 'Whatever' button");
})
->setCloseListener(function(Player $player) : void{
$player->sendMessage("You closed the dialogue");
})
->build();
NpcDialogueManager::send($player, $dialogue);Metadata
Metadata
Assignees
Labels
No labels