[Solved] null initializing plugin error

Discussion in 'Plugin Development' started by Mitsugaru, Mar 1, 2012.

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

    Mitsugaru

    Out of all the plugins that I've edited to work for 1.2.2, I've got one that does not want to load/enable at all. This was working for R4, and I updated to the new event system. Eclipse shows no compile errors against the latest libraries: bukkit-1.2.2-R0.1 ; Vault v1.2.12-b136 ; Spout v882.
    Code:
    [SEVERE] null initializing KarmicShare v0.25 (Is it up to date?)
    java.lang.NullPointerException
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:211)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:53)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:420)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Now, is this actually something from my plugin? I mean, I haven't changed anything on how my plugin enabled between 1.1 and now. Also, having a blank onEnable() method still causes the error. And the stack trace doesn't give any lines within my own classes, so I have no idea where to look.

    Any help regarding this issue is greatly appreciated.
     
  2. Offline

    nisovin

    Post your plugin.yml.
     
  3. Offline

    Mitsugaru

    Did they make changes to the yaml format / nodes?
    Code:
    name: KarmicShare
     
    main: com.mitsugaru.KarmicShare.KarmicShare
     
    version: 0.25
     
    website: http://dev.bukkit.org/server-mods/karmicshare/
     
    description: Community/Group item sharing with limiting karma system
     
    authors:
      - Mitsugaru
     
    softdepend: [Vault, PermissionsEX, Spout]
     
    commands:
      ks:
        description: Root command for KarmicShare
        usage: /ks ? - Show help on KarmicShare
     
    permissions:
        KarmicShare.*:
            description: Gives access to all KarmicShare commands
            children:
                KarmicShare.karma: true
                KarmicShare.give: true
                KarmicShare.take: true
                KarmicShare.admin: true
                KarmicShare.info: true
                KarmicShare.sign: true
                KarmicShare.chest: true
                KarmicShare.group: true
                KarmicShare.karma.other: true
                KarmicShare.commands.*: true
                KarmicShare.group.*: true
                KarmicShare.admin.*: true
            default: op
        KarmicShare.karma:
            description: Allows user view their karma
            default: op
        KarmicShare.karma.other:
            description: Allows user view another user's karma
            default: op
        KarmicShare.give:
            description: Allows user to give items to pool
            default: op
        KarmicShare.take:
            description: Allows user to take items from pool
            default: op
        KarmicShare.info:
            description: Allows user to inspect items
            default: op
        KarmicShare.chest:
            description: Allows user to use the chests
            default: op
        KarmicShare.sign:
            description: Allows user to make/destroy associated signs for chests
            default: op
        KarmicShare.group:
            description: Allows user to access to group commands
            default: op
        KarmicShare.group.create:
            description: Allows user to create groups
            default: op
        KarmicShare.group.add:
            description: Allows user to add players to groups
            default: op
        KarmicShare.group.remove:
            description: Allows user to remove players from groups
            default: op
        KarmicShare.group.leave:
            description: Allows user to leave groups
            default: op
        KarmicShare.group.*:
            description: Allows user to use all group commands
            default: op
            children:
                KarmicShare.group.create: true
                KarmicShare.group.add: true
                KarmicShare.group.remove: true
                KarmicShare.group.leave: true
        KarmicShare.ignore.karma:
            description: Ignores karma. User's karma does not change.
            default: false
        KarmicShare.ignore.group:
            description: Ignores groups. User is of all groups.
            default: false
        KarmicShare.ignore:
            description: Allows user to ignore all the things.
            default: false
            children:
                KarmicShare.ignore.karma: true
                KarmicShare.ignore.group: true
        KarmicShare.commands.give:
            description: Allows usage for command /ks give
            default: op
        KarmicShare.commands.take:
            description: Allows usage for command /ks take
            default: op
        KarmicShare.commands.list:
            description: Allows usage for command /ks list
            default: op
        KarmicShare.commands.value:
            description: Allows usage for command /ks value
            default: op
        KarmicShare.commands.*:
            description: Allows user to use all restricted commands
            default: op
            children:
                KarmicShare.commands.give: true
                KarmicShare.commands.take: true
                KarmicShare.commands.list: true
                KarmicShare.commands.value: true
        KarmicShare.admin.add:
            description: Allows admin to add items to the pool
            default: op
        KarmicShare.admin.reset:
            description: Allows admin to reset a player's karma
            default: op
        KarmicShare.admin.set:
            description: Allows admin to set a player's karma
            default: op
        KarmicShare.admin.drain:
            description: Allows admin to drain an item pool
            default: op
        KarmicShare.admin.reload:
            description: Allows admin to reload config
            default: op
        KarmicShare.admin.group.create:
            description: Allows admin to create groups
            default: op
        KarmicShare.admin.group.delete:
            description: Allows admin to delete groups
            default: op
        KarmicShare.admin.group.add:
            description: Allows admin to force add players to groups
            default: op
        KarmicShare.admin.group.remove:
            description: Allows admin to force remove players from groups
            default: op
        KarmicShare.admin.group.*:
            description: Allows admin to administrate groups
            default: op
            children:
                KarmicShare.admin.group.create: true
                KarmicShare.admin.group.delete: true
                KarmicShare.admin.group.add: true
                KarmicShare.admin.group.remove: true
        KarmicShare.admin.*:
            description: Allows user to administrate plugin
            default: op
            children:
                KarmicShare.karma.other: true
                KarmicShare.info: true
                KarmicShare.admin.add: true
                KarmicShare.admin.reset: true
                KarmicShare.admin.set: true
                KarmicShare.admin.drain: true
                KarmicShare.admin.reload: true
                KarmicShare.admin.group.create: true
                KarmicShare.admin.group.delete: true
                KarmicShare.admin.group.add: true
                KarmicShare.admin.group.remove: true
     
  4. Offline

    nisovin

    There's an issue with R6 where having an empty section in the plugin.yml file will cause an error. Doesn't look like that's the case with yours though.

    You need to remove your getLogger() method, as Plugin has one built in now. It's trying to access it, but yours returns null because it isn't initialized at the time.

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

    Mitsugaru

    Thanks so much :D
    I hadn't known of that change.
     
Thread Status:
Not open for further replies.

Share This Page