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:
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.'
Error:
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
Last edited:
