What is this error ?

Status
This thread has been locked.

chelsea1124

⚔️professional config and server creator⚔️
Premium
Feedback score
17
Posts
423
Reactions
53
Resources
3
Hello mc-market so iv ask like 3 devs already on what this error is and they don't know so I'm coming here to ask a developer on here to see what it is if you would.

Error:
idea64_2017-07-10_09-44-44.png

So I'm not sure what it is but it was working fine before I was trying to add it to where I can use the .getConfig here is the code I'm using for it.

So code on the OnEnable:

File file = new File(getDataFolder(), "config.yml");
if(!file.exists()) {
getConfig().options().copyDefaults(true);
saveConfig();
}

Code in my FreezeCommand class:

private Main main;
public FreezeCommand(Main main) {
this.main = main;
}

Code im useing to get the message in the config.yml:

sender.sendMessage(ChatColor.translateAlternateColorCodes('&', main.getConfig().getString("no-permison")));

And this is what is in the config.yml:

no-permison: '&c&l(!) &cYou do not have permission to run this command.'
 

Attachments

  • idea64_2017-07-10_09-44-44.png
    idea64_2017-07-10_09-44-44.png
    43.5 KB · Views: 32
Last edited:
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

chelsea1124

⚔️professional config and server creator⚔️
Premium
Feedback score
17
Posts
423
Reactions
53
Resources
3
You have to pass in your main class's instance in the constructor.


Basically ~ new FreezeCommand(this)


Now - who were the three developers?
The Developers are friends of mine but to be fair to them the are really tired from doing stuff so
 

chelsea1124

⚔️professional config and server creator⚔️
Premium
Feedback score
17
Posts
423
Reactions
53
Resources
3
Well, they have no idea what they're doing and they definitely need to learn java.

Now, did it work, or?
It does there is no more error but when i do the command and i don't have the permission it don't show the message in the config[DOUBLEPOST=1499682638][/DOUBLEPOST]
Well, they have no idea what they're doing and they definitely need to learn java.

Now, did it work, or?
Would you know why ?
 
Last edited:

chelsea1124

⚔️professional config and server creator⚔️
Premium
Feedback score
17
Posts
423
Reactions
53
Resources
3
If it is a NPE(Null Pointer Exception) it means it cannot find the line in the config. Are you sure you have the path that you put in the command in the config aswell?

~ Oh yeah, and also are you sure the config even EXISTS for that matter?
Yhee anyway you can pm me your skype and ill speak to you on there? if you don't mind
 
Status
This thread has been locked.
Top