error

Discussion in 'Spigot Plugin Help' started by minecrafters, May 11, 2015.

  1. Code (Text):
    [21:51:20 ERROR]: Could not load 'plugins\lastmanstadning.jar' in folder 'plugin
    s'
    org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Na
    me cannot be null
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:133) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:328) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:251) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.ja
    va:286) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.<init>(CraftServer.java:24
    8) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PlayerList.<init>(PlayerList.java:68) [c
    raftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.jav
    a:133) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
    :477) [craftbukkit.jar:git-Bukkit-37102a0]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_31]
    Caused by: java.lang.IllegalArgumentException: Name cannot be null
            at org.apache.commons.lang.Validate.notNull(Validate.java:203) ~[craftbu
    kkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.getWorld(CraftServer.java:
    956) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.Bukkit.getWorld(Bukkit.java:504) ~[craftbukkit.jar:git-Buk
    kit-37102a0]
            at me.TTACsniper1234.Lastmanstanding.lastman.<init>(lastman.java:22) ~[?
    :?]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    ~[?:1.8.0_31]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    ~[?:1.8.0_31]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce) ~[?:1.8.0_31]
            at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_3
    1]
            at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_31]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:52) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:129) ~[craftbukkit.jar:git-Bukkit-37102a0]
            ... 9 more
    it dont work dont know how to explain much more!
    custom coded plugin! dont know what that means
    plugin.yml is good confirmed y 2 peaple
     
  2. what is your plugin.yml then?
     
  3. Plugin's either out of date or missing a dependence (EXP: Vault or iConomy)
     
  4. java.lang.IllegalArgumentException: Na
    me cannot be null

    Thats your problem.

    Code (Text):
    name: YourPlugin #this is what it is talking about
    main: some.path.to.main
    version: 1.0
    author: SomeGuy
     
  5. @ismooch i know i knew that but LOOK AT THIS
    Code (Text):
    name: LastManStanding
    main: me.TTACsniper1234.Lastmanstanding.lastman
    version: 1.0
    commands:
       startlms:
          description: Starts the game!
          usage: /<command>
       joinlms:
          description: Join Last Man Standing!
          usage: /<command>
     
  6. Code (Text):
    [14:50:11 ERROR]: Could not load 'plugins\lastmanstadning.jar' in folder 'plugin
    s'
    org.bukkit.plugin.InvalidPluginException: java.lang.IllegalArgumentException: Na
    me cannot be null
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:133) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:328) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:251) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.ja
    va:286) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:72
    0) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.Bukkit.reload(Bukkit.java:543) [craftbukkit.jar:git-Bukkit
    -37102a0]
            at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
    23) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
    0) [craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServe
    r.java:623) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerCon
    nection.java:1025) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java
    :886) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(SourceFile:37) [craft
    bukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(SourceFile:9) [craftb
    ukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [cra
    ftbukkit.jar:git-Bukkit-37102a0]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [
    ?:1.8.0_31]
            at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_31]
            at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:6
    47) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:2
    84) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:6
    02) [craftbukkit.jar:git-Bukkit-37102a0]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
    :510) [craftbukkit.jar:git-Bukkit-37102a0]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_31]
    Caused by: java.lang.IllegalArgumentException: Name cannot be null
            at org.apache.commons.lang.Validate.notNull(Validate.java:203) ~[craftbu
    kkit.jar:git-Bukkit-37102a0]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.getWorld(CraftServer.java:
    956) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.Bukkit.getWorld(Bukkit.java:504) ~[craftbukkit.jar:git-Buk
    kit-37102a0]
            at me.TTACsniper1234.lastman.Lastman.<init>(Lastman.java:47) ~[?:?]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    ~[?:1.8.0_31]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    ~[?:1.8.0_31]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce) ~[?:1.8.0_31]
            at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_3
    1]
            at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_31]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:52) ~[craftbukkit.jar:git-Bukkit-37102a0]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:129) ~[craftbukkit.jar:git-Bukkit-37102a0]
            ... 20 more
     
  7. Well.. it kinda spits out an error cause it want you to see it.. hence "name cannot be null" meaning that either u messed up your .yml and such.. or you are using names inside your code or something and it's returning as a null value.. try looking at the console for further info.. it helps.. they might say what line it is.. if not then search for like a line that may be depreciated or red.. idk.. that's my guess. I usually fix mine cause it shows what line the error is in :'D
     
  8. Make sure there are no extra spaces? I really don't know it looks like it is fine to me. Ensure that the latest version of your plugin is actually the one you are using. I simply way to do this would be to compare file sizes, but sometimes, you don't make enough changes to tell. I would personally remove the file, recompile, add the file, recompile, then reupload to see if there is a difference. But honestly I don't know what to tell you.
     
  9. Code (Text):
    at me.TTACsniper1234.lastman.Lastman.<init>(Lastman.java:47) ~[?:?]
    Notice this, it should help
     
  10. that dint work eather what could be the problem???????????????????
     
  11. post a few lines of Lastman that are around line 47?
     
  12. Code (Text):
        }

            ArrayList<Player> team1 = new ArrayList<Player>();

            Location lobby = new Location(Bukkit.getWorld(getConfig().getString(
                    "spawns.1.world")), getConfig().getInt("spawns.1.x"), getConfig()
                    .getInt("spawns.1.y"), getConfig().getInt("spawns.1.z"));
            Location loc2 = new Location(Bukkit.getWorld(getConfig().getString(
                    "spawns.2.world")), getConfig().getInt("spawns.2.x"), getConfig()
                    .getInt("spawns.2.y"), getConfig().getInt("spawns.2.z"));

           
    40-51 lines
     
  13. but now the command dont work!