Skip to content

Form Sample

VennV edited this page Jul 29, 2024 · 1 revision
  • I have another feature for people who prefer and need to use plain forms in the scope of a function.
        $formJump = FormSample::getInstance($player);

        // Default form type is TypeForm::MODAL, if you want to change it, you can use setType() method
        $formJump->setTitle("Jump Form");
        $formJump->setContent("You are jumping!");
        $formJump->addContent(new VButton(
            text: "Jump Button",
            image: "https://example.com/image.png"
        ), function(Player $player, mixed $data): void {
            $player->sendMessage("You clicked the jump button!");
        });
  • You can read more at here Click
Clone this wiki locally