Error

Discussion in 'Spigot Plugin Development' started by Jirik, Jul 8, 2015.

  1. What is this error?
    Code (Text):
    java.lang.NullPointerException
    at net.coasterman10.Annihilation.Annihilation.onEnable(Annihilation.java:193) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) ~[minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:417) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:476) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:394) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:866) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.Bukkit.reload(Bukkit.java:301) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [minecraft_server.jar:git-Spigot-1649]

    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:753) [minecraft_server.jar:git-Spigot-1649]

    at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:326) [minecraft_server.jar:git-Spigot-1649]

    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:290) [minecraft_server.jar:git-Spigot-1649]

    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [minecraft_server.jar:git-Spigot-1649]

    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [minecraft_server.jar:git-Spigot-1649]

    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [minecraft_server.jar:git-Spigot-1649]
     
  2. Line 193: Annihilation.java
    Can you give me code?
     
  3. Check your code in Annihilation.java at line 193 because its giving a NPE (NullPointerException) which means something is null.
     
  4. You also might want to upgrade to a 1.8.x server since 1.7.x is not longer recommended
     
  5. I am forget in plugin.yml write command :D