i have started 1 day ago with scripting java and i am working with bukkit.
my question is how i can get&set values( variables ) into a external file (plugin.yml) ?
if(cmd.getName().equalsIgnoreCase( *commandforx* )) ......
Don't store variables in plugin.yml. Instead you can use the FileConfiguration API that is in the Bukkit API by default! Here is a great tutorial on doing this: https://forums.bukkit.org/threads/tut-bukkits-new-fileconfiguration-api-create-a-yaml-configuration.42775/
Or alternatively, you can just read and write from a defined file (Tutorials on this are everywhere online) and parse the input. This is more difficult then using the FileConfiguration API, but it's still very simple and gives you more control over the file (I always use this method).