Solved WTF error.

Discussion in 'Spigot Plugin Development' started by froyz, Jun 22, 2016.

  1. Hi guys,
    I already did some plugins, but this time, this error is very strange.
    The code with the error ( line with getCommand )
    Code (Text):
          public void onEnable(){
              getCommand("givedisco").setExecutor(new CommandeKit());
    error:
    Code (Text):
     Error occurred while enabling ArmureColor v1.0 (Is it up to date?)
    java.lang.NullPointerException
            at fr.froyz.ArmureColor.Main.onEnable(Main.java:23) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugin(CraftServer.java:362) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:322) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.craftbukkit.v1_10_R1.CraftServer.reload(CraftServer.java:746) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.Bukkit.reload(Bukkit.java:539) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) [spigot.jar:git-Spigot-c55900f-9af379f]
            at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchServerCommand(CraftServer.java:632) [spigot.jar:git-Spigot-c55900f-9af379f]
            at net.minecraft.server.v1_10_R1.DedicatedServer.aL(DedicatedServer.java:437) [spigot.jar:git-Spigot-c55900f-9af379f]
            at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-c55900f-9af379f]
            at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot.jar:git-Spigot-c55900f-9af379f]
            at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-c55900f-9af379f]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
     
  2. Solved, i created an other projet and it works now. Very strange error...
     
  3. For anyone else wondering, OP probably didn't put the command in his Plugin.yml the first time.
     
  4. No ahah, i did it :), it was java 7 too
     
  5. Can someone Explain who OP is?
     
  6. Original poster?
     
    • Winner Winner x 1
  7. Please Make Sure To Mark The Thread As Solved :D
     
  8. Ohhh okay thanks <3
     
  9. Ah yes sorry i forget it