I'm give you a little advice. I did exactly what you did. Got someone else script, did a little copy and paste, and a bit of editing. I ran the script to see what everything does. If you want to improve your coding, best thing to do is. If your trying to make a magic script, look for a open source magic script. Or download this program that convert the .jar or .class file into readable .java file. Then youll be able to download local scripts and convert them. Then you read into the script and see how cast a spell, and you try it out on your script. Also reading into a couple of java books help improve your coding. If your stuck, you could post help under issue, the community is nice, and helpful.
And if you need any further help or explanation you could ask me on Skype I'll help you out to my best ability
Jose.dpay