-
Notifications
You must be signed in to change notification settings - Fork 2
Home
VennV edited this page Jul 28, 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: if you do not add
VFormLoader::init($this)
toonEnable()
then your chance of failure is up to 99.99% - In the latest version of VFormOOPAPI, you need to use
YourClass::getInstance($player)->sendForm()
instead ofYourClass::send($player)
use venndev\vformoopapi\Form;
use venndev\vformoopapi\utils\TypeForm;
....
#[VForm(
title: "Your Title",
type: TypeForm::NORMAL_FORM
)]
class YourFile 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();
}
}
}