Config error

Discussion in 'Plugin Development' started by Jumb_1907, May 16, 2017.

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

    Jumb_1907

    Hey,

    I'm currently making a blockbreaker plugin but there is something wrong.
    I'm trying to save the locations in the config like this:

    World w = Main.plugin.getServer().getWorld(split[0]);
    and my error is here:
    String[] split = s.split(",");
    World w = Main.plugin.getServer().getWorld(split[0]);
     
  2. Online

    timtower Administrator Administrator Moderator

    @Jumb_1907 What is the config?
    What error do you get?
     
  3. Offline

    Jumb_1907

    Error:
    Code:
    [17:13:50] [Server thread/ERROR]: Error occurred while enabling BlockBreakerJumbo v0.0.1 (Is it up to date?)
    java.lang.NullPointerException
        at me.jumbo1907.bockbreaker.main.Var.loc(Var.java:19) ~[?:?]
        at me.jumbo1907.bockbreaker.main.Main.onEnable(Main.java:32) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:356) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:316) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:742) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.Bukkit.reload(Bukkit.java:534) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:642) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1135) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:970) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_101]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_101]
        at net.minecraft.server.v1_8_R3.SystemUtils.a(SystemUtils.java:19) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:718) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:367) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:657) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:560) [spigot-1.8.7.jar:git-Spigot-d2856ae-8f0f4ed]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_101]
    [17:13:50] [Server thread/INFO]: [Essentials] Enabling Essentials v2.0.1-b370
     
  4. Online

    timtower Administrator Administrator Moderator

    @Jumb_1907 Things that can be null:
    • Main.plugin
    • s (no idea where this comes from)
    • The world that you get back.
     
Thread Status:
Not open for further replies.

Share This Page