i just dont understand what i do wrong

Discussion in 'Plugin Development' started by Blacktiger07, Nov 26, 2011.

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

    Blacktiger07

    hi, just wrote my plugin.tested it on 1502 build, error
    then wrote it again for 1337 tested but the error comes again.
    pls can anyone tell me what the **** im doing wrong ?!
    here is the full console output for 1337 build
    Code:
    161 recipes
    17 achievements
    12:42:16 [INFORMATION] Starting minecraft server version Beta 1.8.1
    12:42:16 [INFORMATION] Loading properties
    12:42:16 [INFORMATION] Starting Minecraft server on *:25565
    12:42:16 [INFORMATION] This server is running Craftbukkit version git-Bukkit-0.0.0-1131-g86b7fa8-b1337jnks (MC: 1.8.1)
    12:42:16 [INFORMATION] Preparing level "world"
    12:42:16 [INFORMATION] Default game type: 0
    12:42:16 [INFORMATION] Preparing start region for level 0 (Seed: -3576332621575043871)
    12:42:17 [INFORMATION] Preparing start region for level 1 (Seed: -3576332621575043871)
    12:42:17 [INFORMATION] Preparing spawn area: 0%
    12:42:18 [SCHWERWIEGEND] Error occurred while enabling SignInteract v0.0.1 (Is it up to date?): null
    java.lang.NullPointerException
            at me.blacktiger07.signinteract.SignInteract.onEnable(SignInteract.java:25)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    12:42:18 [INFORMATION] Server permissions file permissions.yml is empty, ignoring it
    12:42:18 [INFORMATION] Done (0,178s)! For help, type "help" or "?"
    >
     
  2. Offline

    Darkman2412

    What's line 25 in SignInteract.java?
     
  3. Offline

    jaydenbadboii

    As said above, check that line.
    By the looks, there's something wrong with onEnable.
     
  4. Offline

    Blacktiger07

    this is the 25th line. its in onEnable
    Code:
    log.info("SignInteract v" + pdffile.getVersion() + " enabled");
    EDIT: You can take a look on my project on github
     
  5. Offline

    coldandtired

    You don't create new instances of the listeners.
     
  6. Offline

    ItsHarry

    Code:
    private SignInteractBlockListener blockListener;
    should be
    Code:
    private SignInteractBlockListener blockListener = new SignInteractBlockListener();
     
  7. Offline

    Blacktiger07

    also for playerListener?
    did you find anything else whats wrong? i know it sounds nooblike
     
  8. Offline

    ItsHarry

    Yes, also for playerListener.

    Oh and I did find another error:
    In your onCommand, you check args[1];

    But you need to use args[0]:
    /give itsharry 46 64

    give = label
    itsharry = args[0]
    46 = args[1]
    64 = args[2]

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  9. Offline

    Blacktiger07

    okay, but i still get the error, may you can take a look at line 25. it dont know whats wrong there.

    coded new and pushed to github
    error is still there

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  10. Offline

    iPhysX

    Still @ line 25?
     
  11. Offline

    Blacktiger07

    yes :(
     
  12. Offline

    iPhysX

    Try removing the pdffile..
    Just add a version in your startup string for now
     
  13. Offline

    Blacktiger07

    okay wait a moment

    EDIT: oh wow...fixed :DDDD
    just dont understand why it didnt work -.-
     
  14. Offline

    iPhysX

    Yeah xD, glad I could help though :)
     
  15. Offline

    Blacktiger07

    just one question left...how can i get this cool Plugin Developer symbol under my name?
     
  16. Offline

    iPhysX

    You can't for now. It's frozen to the people that already have it.
    There is a new system coming though, so you will have the opportunity then :)
     
  17. Offline

    Blacktiger07

    okay thanks for your help
     
  18. Offline

    iPhysX

    Good luck :)
     
  19. Offline

    ItsHarry

    I love my purple developer tag :D
     
    iPhysX likes this.
  20. Offline

    iPhysX

    I agree it looks snazzy :p
     
  21. Offline

    ItsHarry

    Lol :D
    Anyways, I'll stop being off-topic now.
     
Thread Status:
Not open for further replies.

Share This Page