#saveResource

1 messages · Page 1 of 1 (latest)

gritty aspen
#

could we see your code and Project Explorer / Layout?

terse bear
#

using intelliJ

public class Main extends JavaPlugin {
    private final FileConfiguration configFile = this.getConfig();
    private final YamlConfiguration config = (YamlConfiguration) configFile;
    saveResource("config.yml", false);
}
gritty aspen
#

and your IDE says that saveResource isn't a method?

terse bear
#

not directly but everything points to it not recognising it as a method

gritty aspen
#

what does your IDE say?

terse bear
#

Missing method body, or declare abstract is one of them

gritty aspen
#

could you send a screenshot of you hovering over the error?

terse bear
#

dang it. im not verified

gritty aspen
#

imgur it

terse bear
gritty aspen
#

oh duh

#

the scope is in the class

#

you have to call that within probably onEnable

terse bear
#

THATS WHAT I"VE BEEN MISSING

gritty aspen
#
public void onEnable() {
  saveResource("config.yml", true);
}
terse bear
#

i knen that

gritty aspen
#

👍

terse bear
#

lol thx