File understanding problem.

Discussion in 'Plugin Development' started by Ibas, May 20, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Ibas

  2. Offline

    Blabba

    If you want to use a file seperate from config.yml, you can copy and paste the code under the header "Mirroring the JavaPlugin implementation " from the second link.
     
  3. Offline

    Ibas

    Code:
    FileConfiguration star = null;
    File starFile = null;
    And what's next? What line should be in onEnable to load it? Because I see only reload/save.

    I get error if I write:
    Code:
    try {
                    star.load(starFile);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }


    Code:
    2013-05-20 20:20:33 [SEVERE] java.lang.NullPointerException
    2013-05-20 20:20:33 [SEVERE]    at lt.bukkit.star.star.loadYaml(star.java:46)
    2013-05-20 20:20:33 [SEVERE]    at lt.bukkit.star.star.onEnable(star.java:17)
    2013-05-20 20:20:33 [SEVERE]    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    2013-05-20 20:20:33 [SEVERE]    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
    2013-05-20 20:20:33 [SEVERE]    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:383)
    2013-05-20 20:20:33 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugin(CraftServer.java:306)
    2013-05-20 20:20:33 [SEVERE]    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.enablePlugins(CraftServer.java:288)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.j(MinecraftServer.java:310)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.e(MinecraftServer.java:289)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.a(MinecraftServer.java:249)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:149)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:388)
    2013-05-20 20:20:33 [SEVERE]    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
     
Thread Status:
Not open for further replies.

Share This Page