Help with code

Status
This thread has been locked.

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Hey guys, I'm a new programmer and I'm trying to access a config file from another class. However, when I go and run the command that would access the config file, I get this error(see below). When I create the command listener in the main class, it works there but when I create it in another class, it doesn't work. I think it has something to do with importing the main class in but i don't know. Help would be appreciated. Thanks! Sorry, I'm still new at this.



main class:
setwarp class (where im trying to access the file config from):
config manager class:
error:
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Turtle

turtle#1989
Supreme
Feedback score
17
Posts
751
Reactions
419
Resources
0
Hey guys, I'm a new programmer and I'm trying to access a config file from another class. However, when I go and run the command that would access the config file, I get this error(see below). When I create the command listener in the main class, it works there but when I create it in another class, it doesn't work. I think it has something to do with importing the main class in but i don't know. Help would be appreciated. Thanks! Sorry, I'm still new at this.



main class:
setwarp class (where im trying to access the file config from):
config manager class:
error:

plugin = new ConfigManagerWarps();

why are you doing this, use dependency injection or abuse statics
 

Fluddershy

Feedback score
2
Posts
277
Reactions
133
Resources
0
yes 3clipse.#6059[DOUBLEPOST=1515199522][/DOUBLEPOST]
No idea what those 2 are lol, I'm literally 1 week into bukkit programming
Well if you know Java, one week into bukkit programming is a breeze. Make sure to learn Java before everything else, because it seriously does help. After all, Bukkit is just an API/Lib for Java. Also, google is your best friend. Instead of commenting on someone's post, possibly waiting until they tell you, google it.

We're not here to baby you. Here's one thread I found on dependency injection.
 

3clipseFX

Motion//Animations//Graphics
Premium
Feedback score
5
Posts
217
Reactions
31
Resources
0
Well if you know Java, one week into bukkit programming is a breeze. Make sure to learn Java before everything else, because it seriously does help. After all, Bukkit is just an API/Lib for Java. Also, google is your best friend. Instead of commenting on someone's post, possibly waiting until they tell you, google it.

We're not here to baby you. Here's one thread I found on dependency injection.

Yea, I forgot to mention, I'm 3 or 4 months into my java course at school. It was kinda slow so I wanted to go my own way. Sorry this was my last resort. Don't know why I didn't find the thread you linked sooner but thanks!
 
Status
This thread has been locked.
Top