Minecraft bukkit scheduler and procedural instance naming
This question is probably pretty obvious to any person who knows how to
use Bukkit properly, and I'm sorry if I missed a solution in the others,
but this is really kicking my ass and I don't know what else to do, the
tutorials have been utterly useless. There are really 2 things that I need
help doing:
I need to learn how to create an indefinite number of instances of an
object. I figure it'd be like this:
int num = 0;
public void create(){
String name = chocolate + num;
Thingy name = new Thingy();
}
So you see what I'm saying? I need to basically change the name that is
given to each new instance so that it doesn't overwrite the last one when
created. I swear I've looked everywhere, I've asked my Java professor and
I can't get any answers.
2: I need to learn how to use the stupid scheduler, and I can't understand
anything so far. Basically, when an event is detected, 2 things are
called: one method which activates instantly, and one which needs to be
given a 5 second delay, then called. The code is like this:
public onEvent(event e){
Thingy thing = new Thingy();
thing.method1();
thing.doOnDelay(method2(), 100 ticks);
}
Once again, I apologize if I am not giving too many specifics, but I
cannot FOR THE LIFE OF ME find anything about the Bukkit event scheduler
that I can understand.
DO NOT leave me links to the Bukkit official tutorials, I cannot
understand them at all and it'll be a waste of an answer. I need somebody
who can help me, I am a starting plugin writer.
I've had Programming I and II with focus in Java, so many basic things I
know, I just need Bukkit-specific help for the second one.
The first one has had me confused since I started programming.
Thank you in advance for any help!
No comments:
Post a Comment