YouLoan Plugin HELP !

Discussion in 'Plugin Development' started by Dragonern3, Feb 17, 2012.

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

    Dragonern3

    MY YouLoan Plugin Dont work, When we try to do /loanmoney Loan ...
    Then An Internal error occurred while attempting to perform this command

    2012-02-17 17:20:44 [INFO] [Broadcast]  If you Need wood, or a place to build. Go to /warp Forest 
    ... 12 more
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    at me.jeroende2e.youloan.CommandHandler.onCommand(CommandHandler.java:74)
    Caused by: java.lang.NullPointerException
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:725)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:737)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:777)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:386)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    org.bukkit.command.CommandException: Unhandled exception executing command 'loanmoney' in plugin YouLoan v1.1
     
  2. Offline

    Father Of Time

    You have a null point exception, start making console print statements and track her down. :eek:

    Edit: it appears to be in your onCommand handler, put a console print in between every line of code inside that function, that prints "reached 1", "reached 2" etc, then run the plug-in again and cause the same crash.

    In the console you will see:
    reached 1
    reached 2
    reached 3
    reached 4
    Crash info...

    The code that resides after the last successfully reached console print is your problem code (unless it's a function call, then the null might be coming from the function call). This likely isn't the best way to do this, but it works 100% of the time.
     
  3. Offline

    Njol

    The error is in line 74 of CommandHandler.java as can be seen here:
    at me.jeroende2e.youloan.CommandHandler.onCommand(CommandHandler.java:74)
     
  4. Offline

    bond654

    can someone make a new loan plugin?
     
Thread Status:
Not open for further replies.

Share This Page