-
Notifications
You must be signed in to change notification settings - Fork 2
Home
VennV edited this page Jul 30, 2024
·
4 revisions
HELLO USER
Welcome to VFormOOPAPI's Wiki!!,
We will show you how to use it
Welcome to VFormOOPAPI's Wiki!!,
We will show you how to use it
- This is a menu virion created and developed by VennDev
- It is similar to
FormAPI
in that there are 3 types of menus, which are:
- And of course, each type will have different roles and uses, click on each type to learn how it operates or you can see how to create custom menu at config
...
use venndev\vformoopapi\VFormLoader;
public function onEnable() : void{
VFormLoader::init($this);
}
- Note: You need to init VFormLoader::init($this) to request the method definition into your plugin to use this virion!
use venndev\vformoopapi\Form;
use venndev\vformoopapi\utils\TypeForm;
....
#[VForm(
title: "Your Title",
type: TypeForm::NORMAL_FORM
)]
class YourForm extends Form{
use SingletonTrait;
public function __construct(Player $player){
parent::__construct($player);
}
//Your code in here...
}
use YourFile;
class YourCommandFile {
//Your code...
public function execute(CommandSender $sender, string $label, array $args){
if ($sender instanceof Player) {
YourFile::getInstance($player)->sendForm();
}
}
}