Solved NullpointerExceptions - On Start up.

Discussion in 'Plugin Development' started by MCForger, Sep 28, 2012.

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

    MCForger

    SOLVED
     
  2. Offline

    DrAgonmoray

    Right before line 13, add the following:
    Code:
    System.out.println(plugin);
    System.out.println(plugin.getCommand("broadcast"));
    then test it and report back what it says.

    Are you sure you're registering the command correctly? Show us your plugin.yml plz.

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

    krazytraynz

    There shouldn't be indents in your plugin.yml file, only double spaces.
    Code:
    name: KingKraft
    main: com.mcforger.kingkraft.kingkraft
    version: 1.1
    description: KingKraft Official Server!
    author: MCForger
    commands:
      broadcast:
        description: Custom KingKraft Prefix.
    permissions:
      kingkraft.broadcast:
        default: op
     
  4. Offline

    DrAgonmoray

    Well it obviously can't find the command.. I'm not entirely sure why... Sorry I couldn't be of more help.
     
  5. Offline

    MCForger

    Those arent indents and thanks anyways Dr.
     
  6. Offline

    DrAgonmoray

    Yeah, if those were indents the plugin wouldn't run at all
     
  7. Offline

    MCForger

    SOLVED.
     
Thread Status:
Not open for further replies.

Share This Page