ArrayIndexOutOfBoundsException #8


  • New
  • Defect
Open
Assigned to _ForgeUser7044008
  • skylord5816 created this issue Feb 4, 2013

    What steps will reproduce the problem?
    1. Run the command /acceptbounty with no parameters.

    What is the expected output? What do you see instead?
    Expected output would either be a list of bounties or a custom error message. Instead, I get a stacktrace in console and Bukkit's generic error message.

    What version of the product are you using?
    4.2.1

    Do you have an error log of what happened?
    [INFO] Player issued server command: /bountyaccept
    [SEVERE] java.lang.ArrayIndexOutOfBoundsException: 0
    [SEVERE] at pvpbounty.listeners.PBacceptbountyexecutor.onCommand(PBacceptbountyexecutor.java:56)
    [SEVERE] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
    [SEVERE] at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514)
    [SEVERE] at net.minecraft.server.v1_4_R1.PlayerConnection.handleCommand(PlayerConnection.java:980)
    [SEVERE] at net.minecraft.server.v1_4_R1.PlayerConnection.chat(PlayerConnection.java:898)
    [SEVERE] at net.minecraft.server.v1_4_R1.PlayerConnection.a(PlayerConnection.java:853)
    [SEVERE] at net.minecraft.server.v1_4_R1.Packet3Chat.handle(Packet3Chat.java:44)
    [SEVERE] at net.minecraft.server.v1_4_R1.NetworkManager.b(NetworkManager.java:290)
    [SEVERE] at net.minecraft.server.v1_4_R1.PlayerConnection.d(PlayerConnection.java:113)
    [SEVERE] at net.minecraft.server.v1_4_R1.ServerConnection.b(SourceFile:39)
    [SEVERE] at net.minecraft.server.v1_4_R1.DedicatedServerConnection.b(SourceFile:30)
    [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.r(MinecraftServer.java:598)
    [SEVERE] at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:224)
    [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
    [SEVERE] at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
    [SEVERE] at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)

    Please provide any additional information below.
    In pvpbounty.listeners.PBacceptbountyexecutor.java, move:
            OfflinePlayer a0 = Bukkit.getOfflinePlayer(args[0]);
    after the line right below:
            if (args.length == 1)

    PBremovebountycommand, TrackCommand, and possibly several other files need similar fixes.

  • skylord5816 added the tags Defect New Feb 4, 2013
  • Forge_User_67068344 posted a comment Feb 6, 2013

    Same problem here.


To post a comment, please login or register a new account.