Instead of the config set {}

Discussion in 'BungeeCord Plugin Development' started by Lmperatoreq, Aug 12, 2018.

  1. Hello, I make the necessary information in the config and save it, when I open it I see that there is no information which I wanted to receive, there {}, I ask help

    Sorry for bad translate.

    Set config line and save void:

  2. Please help me again
  3. Hello, as I understand your plugin bug when you want to put the password? Your "if" before works?
  4. Yes, but my checks do not work because I can not put the required information in the config, instead I put {}
  5. there is 'isString' method in fileconfiguration,
    can you show us your methods? save, setconfigtofile and field configuration
  7. Code (Text):

    public class ProtectorBungee extends Plugin {

      private Configuration configuration;

      public void onEnable() {

      public Configuration getConfig() {
        return configuration;

      private void saveDefaultConfig() {
        boolean created = this.getDataFolder().mkdirs();

        final File file = new File(getDataFolder(), "config.yml");

        if (!file.exists()) {
          try (InputStream in = getResourceAsStream("config.yml")) {
            Files.copy(in, file.toPath());
          } catch (IOException e) {

        try {
          this.configuration = ConfigurationProvider
              .getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
        } catch (IOException e) {


    • Agree Agree x 1
  8. java.lang.NullPointerException