Error in (easy) plugin

Discussion in 'Plugin Development' started by rcth, Apr 15, 2013.

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

    rcth

    Hi,

    I am developing a small private plugin, and it isn't really working.

    Mainclass:
    http://pastebin.com/rvmDmJTu (ChatListener class doens't matter, because there isn't an error in there)

    Stacktrace:
    20:35:29 [SEVERE] Error occurred while enabling TC-Core vV0.1 (Is it up to date?
    )
    java.lang.NullPointerException
    at com.tc.core.TCCore.onEnable(TCCore.java:24)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:457)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:381)
    at org.bukkit.craftbukkit.v1_5_R2.CraftServer.loadPlugin(CraftServer.jav
    a:282)
    at org.bukkit.craftbukkit.v1_5_R2.CraftServer.enablePlugins(CraftServer.
    java:264)
    at org.bukkit.craftbukkit.v1_5_R2.CraftServer.<init>(CraftServer.java:21
    8)
    at net.minecraft.server.v1_5_R2.PlayerList.<init>(PlayerList.java:55)
    at net.minecraft.server.v1_5_R2.DedicatedPlayerList.<init>(SourceFile:11
    )
    at net.minecraft.server.v1_5_R2.DedicatedServer.init(DedicatedServer.jav
    a:105)
    at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java
    :381)
    at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:5
    73)
     
  2. Offline

    skore87

    I imagine "getConsoleSender()" is returning null, however bukkit will automatically write to the console when your plugin is enabled and disabled using the logger.
     
  3. Offline

    Rocoty

    If you want to print messages to the console, use instead a Logger:
    Code:
    Logger log = getLogger();
     
    log.info("MESSAGE");
     
  4. Offline

    skore87

    There's also the warning and severe methods as well as log(level,message) w/ overloads.
     
    Rocoty likes this.
  5. Offline

    Rocoty

    Indeed. Thank you for helping me point that out.
     
Thread Status:
Not open for further replies.

Share This Page