fixed (Please delete)

Discussion in 'Spigot Plugin Development' started by OfirTIM, Jul 7, 2015.

Thread Status:
Not open for further replies.
  1. nothing
     
    #1 OfirTIM, Jul 7, 2015
    Last edited: Jul 8, 2015
  2. Caused by: java.lang.IllegalArgumentException: Plugin cannot be null
    at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.BeforeGameStarted(GameRunning.java:26) ~[?:?]
    at me.OfirTIM.KitPvP.TwoVTwo.Main.onCommand(Main.java:153) ~[?:?]

    You're passing null instead of a valid plugin instance, check those lines :)
     
    • Like Like x 1
  3. Checked...
    this is the line code


    Code (Text):
            BeforeGameStarted = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main, new BukkitRunnable() {
     
    for some reason idk what is the matter with it
     
  4. can you help me within this?
     
  5. Where do you set the value Main? Using Plugin.getPlugin(YOUR_PLUGIN_CLASS.class) would be a suitable replacement.
     
    • Like Like x 1
  6. wont work... its show's this... :
    http://prntscr.com/7pu41u
     
  7. Got new problem...
    Code (Text):
    [16:04:45] [Server thread/WARN]: [BubbleWars] Task #2 for BubbleWars v1.0 generated an exception
    java.lang.IllegalArgumentException: Plugin cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.validate(CraftScheduler.java:397) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:119) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:456) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.HalfGameLeft(GameRunning.java:73) ~[?:?]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning$1.run(GameRunning.java:63) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    [16:04:46] [Server thread/INFO]: [0;33;22m[21mThe game started![m
    [16:04:46] [Server thread/WARN]: [BubbleWars] Task #2 for BubbleWars v1.0 generated an exception
    java.lang.IllegalArgumentException: Plugin cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.validate(CraftScheduler.java:397) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:119) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:456) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.HalfGameLeft(GameRunning.java:73) ~[?:?]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning$1.run(GameRunning.java:63) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    [16:04:47] [Server thread/INFO]: [0;33;22m[21mThe game started![m
    [16:04:47] [Server thread/WARN]: [BubbleWars] Task #2 for BubbleWars v1.0 generated an exception
    java.lang.IllegalArgumentException: Plugin cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.validate(CraftScheduler.java:397) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:119) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:456) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.HalfGameLeft(GameRunning.java:73) ~[?:?]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning$1.run(GameRunning.java:63) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    [16:04:48] [Server thread/INFO]: [0;33;22m[21mThe game started![m
    [16:04:48] [Server thread/WARN]: [BubbleWars] Task #2 for BubbleWars v1.0 generated an exception
    java.lang.IllegalArgumentException: Plugin cannot be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.validate(CraftScheduler.java:397) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:119) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:456) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.HalfGameLeft(GameRunning.java:73) ~[?:?]
        at me.OfirTIM.KitPvP.TwoVTwo.GameRunning$1.run(GameRunning.java:63) ~[?:?]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
        at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
     
  8. at me.OfirTIM.KitPvP.TwoVTwo.GameRunning.HalfGameLeft(GameRunning.java:73) ~[?:?]
    at me.OfirTIM.KitPvP.TwoVTwo.GameRunning$1.run(GameRunning.java:63) ~[?:?]

    You are having the old issue at that place too.
     
    • Like Like x 1
  9. can you tell me how to fix it?
     
  10. FIXEDDDD
     
  11. Do you know java?
     
  12. JustThiemo

    JustThiemo Previously TrinityDEV

    Well, for what we know about him, no he doesn't. And if you mention him to learn proper java, he gets mad and doesn't appreciate your help :)
     
    • Funny Funny x 1
    • Informative Informative x 1
  13. Oh XD, well then :p
     
  14. i dont like it when peoples saying i dont know java and i dont need any help that's all... i do know java... just that sometimes i go for a long time and i forget things... so i come to here and check if someone could help me... dont get me wrong... i do know Java... just that my memory does'nt really love to appear when i am working on JavaPlugins
     
  15. Doesn't appear because you don't know java.
     
  16. Don't be rude @TheBlackFish, this place is for starting or less starter programmers to ask a question about their code or ideas. Maybe their code isn't working like here, maybe something else. I don't know. But you shouldn't blame people for learning something an another way. Like we say in the Netherlands: Er leiden vele wegen naar Rome (translation: Many ways lead to Rome). Some people do thing just different.
     
    • Agree Agree x 1
    • Friendly Friendly x 1
  17. Thanks for the support bro! i love Netherland because aucally all my friends from there XD thanks for being nice and supportable
     
    • Like Like x 1
  18. JustThiemo

    JustThiemo Previously TrinityDEV

    Dat je nederlands bent is nice, hue eindelijk iemand. But, why would you even try to make a whole minigame if you dont know some basic java, if you make like an anti swear plugin and ask for some help because you're new, okay. But don't try to make a minigame if you don't understand it
     
Thread Status:
Not open for further replies.