Is there any way that i can chose in the config.yml to enable or disable a command of the plugin or the entire plugin?
Yes. You can set the variable in config.yml. Example: Code: enabled: true Then in onEnable() function of your plugin put: PHP: $this->cfg = $this->getConfig()->getAll();if($this->cfg["enabled"] != true){ $this->getPluginLoader()->disablePlugin($this);}
In fact, doing $this->getConfig()->get("enabled") is as (or even more) efficient as (or than) storing the array to a field first.