I'm working on factions'ui and I need to know how to get the data imputed into a Slider or Input bar in it so if they do /f create it opens a tab with a bar where you can type in I what to know how to get the data inputed into the bar
I use https://github.com/jojoe77777/FormAPI/ but I'm trying to get the data inputed and it doesn't have an explanation
I do that on my code, but i don't use API's i use packets and a simple code for this, look my example i have created for you: PHP: if($pk->formId === ID){ $data = json_decode($pk->formData); if($data===null){ }elseif($data !== null){ $this->plugin->getServer()->dispatchCommand($player, trim(implode(" ", ["f create ".$data[0].""]))); } } You just need to put $data[0] on it to get what the player puts on placeholder and do that code into a not null data. Sorry if my english are not the best.
//how it works //it adds a new inputlike form->addInput("factionname"); //I wana see what is inputed my doesn't use packets
Would you be so kind and stop annoying/offending new developers if you can't contribute to the thread? Nobody's stealing your idea, it's not like it's the most unique idea ever...