How do you store information temporarily without the use of an config? Do you have to use a private? Ex: PHP: Private $example = false; When you change it with something like umm, PHP: $this->example = true; Will this work also? PHP: Private $example = 0; When you change it with something like umm, PHP: $this->example = 1;//and will this work also?$this->example = 0; + $a;$a = 1;
@Legomite if you want to use a variable in any function of your plugin, you need to declare it at the begining of the plugin, with the private $api; PHP: class PLUGIN implements Plugin{ private $api; private $exemple; public function __construct(ServerAPI $api, $server = false) { $this->api = $api; $this->exemple = array(); }... you can easy store informations in $exemple but this variable ll be deleted if you stop de server. dont forget to unset() if it contain useless value !
PHP: public function UnsetArray($data){ if($key = in_array("$data", $this->example)){ unset($this->example[$key]); }} ^^^^^ This will let you unset arrays PHP: public function SetArray($data){ array_push($this->example, "$data");} ^^^^^ This will let you set arrays PHP: public function CreateArray($data){ $this->example = array();} ^^^^^ This will let you create arrays @Legomite
Wow! this would have been really helpful, I had no idea you could do the public variable thing, I made a CTF plugin and I used the config to link all the functions together this is ridiculously helpful thanks.