So i realised this could be done so much easier. http://pastebin.com/Vm3GTp9y Sendt fra min ALE-L21 med Tapatalk
@JanTuck Do you have a problem with the class, or is this meant for others to use? If it is the latter, move this to Resources, There is a lot that can be improved on to reduce line count and general usability. Later, I will try to fix this.
This is what i mean i was halfway through when i realised i should do it another way, i wasnt home. And only had eclipse to use it is lucky i even got this far... also.. please dont tell me some ideas you have. Did not even have minecraft to test it on. Sendt fra min ALE-L21 med Tapatalk
@JanTuck What exactly is the point of this thread? To get feedback on the code? To get better code? To show the code and tell already that it can be better?
It was actually just to learn more about reflection, and if others could use the code then why not. Edit: I had 2 hours to write this and no time to test it. Tomorrow i think ill rewrite it, and try to optimize it. Sendt fra min ALE-L21 med Tapatalk
@JanTuck Then I suggest that you mess with some different stuff, not with copy pasting the same thing over and over again.
@JanTuck Here are some things you can fix To clean up the imports, you should use * for all the classes in the same package You should store the server version once, instead of creating it multiple times A lot of those methods are one from the base class. You should try getting methods specific to the CraftPlayerClass Instead of you throwing an exception, either make the method throw an Exception or return Objectives(? that should be what they're called)
I will do this when i get some time. These are all the functiond Almost. Found in the CraftPlayer.class. i left out some privates and some spawn particle functions Sendt fra min ALE-L21 med Tapatalk
@JanTuck He was responding to things you can make. One of the things that Bukkit doesn't allow you to do is register commands at run time, they must be in that file. Make a plugin that dynamically adds and removes commands.
@mythbusterma I was expressing my excitement for making. xD Edit: @timtower @Zombie_Striker Another thing i need feedback on. I created these methods to get around those, annoying try and catch clusters. Are these useful? - Code snipped- Edit: http://pastebin.com/YjvCaVbC