Solved Repeating task not activating

Discussion in 'Plugin Development' started by ItsMas_, Feb 11, 2016.

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

    ItsMas_

    I have a repeating task to alert staff when players could be using an autoclicker, but the task is not activating.

    Code redacted
     
    Last edited: Feb 13, 2016
  2. Offline

    teej107

    @ItsMas_ is that method in your JavaPlugin extended class? Are you sure clickCount contains the UUID as a String? Also why don't you just use UUID? You shouldn't need to turn it into a String.
     
    ItsMas_ likes this.
  3. Offline

    ItsMas_

    Moved it to main class, getting this error:

    Code:
    [20:06:28] [Server thread/WARN]: [MasCore] Task #2 for MasCore v1.0.0 generated an exception
    java.lang.NullPointerException
        at me.mas.core.Core$1.run(Core.java:52) ~[?:?]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:53) ~[craftbukkit.jar:git-Bukkit-18fbb24]
        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:349) [craftbukkit.jar:git-Bukkit-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:680) [craftbukkit.jar:git-Bukkit-18fbb24]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:335) [craftbukkit.jar:git-Bukkit-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:629) [craftbukkit.jar:git-Bukkit-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:537) [craftbukkit.jar:git-Bukkit-18fbb24]
        at java.lang.Thread.run(Unknown Source) [?:1.7.0_79]
     
    Last edited: Feb 11, 2016
  4. Offline

    teej107

  5. Offline

    Gerov

    @ItsMas_ NullPointerExceptions can be frustrating when you are first starting, I even made a post or two about my own.

    A good way to figure it out is go to the line it is happening at, take that line apart, and then think, "What did I not check", "What did I not initialize properly", "What on this line could possibly be null". And then go from there.
     
Thread Status:
Not open for further replies.

Share This Page