Unhandled exception executing command? Help??

Discussion in 'Bukkit Help' started by GhostHack, Feb 26, 2014.

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

    GhostHack

    im creating a simple donation plugin for my server it was all working fine but i wanted to make it so you didnt have to go through a long complicated way to get a wand for the signs. Once i added that sub command i started to get this error
    Error Code
    Code:java
    1. [22:45:23] [Server thread/ERROR]: null
    2. org.bukkit.command.CommandException: Unhandled exception executing command 'donate' in plugin Donator v2.1
    3. at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-1322]
    4. at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) ~[spigot.jar:git-Spigot-1322]
    5. at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:704) ~[spigot.jar:git-Spigot-1322]
    6. at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:972) [spigot.jar:git-Spigot-1322]
    7. at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:817) [spigot.jar:git-Spigot-1322]
    8. at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [spigot.jar:git-Spigot-1322]
    9. at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:65) [spigot.jar:git-Spigot-1322]
    10. at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147) [spigot.jar:git-Spigot-1322]
    11. at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java:77) [spigot.jar:git-Spigot-1322]
    12. at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:700) [spigot.jar:git-Spigot-1322]
    13. at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:273) [spigot.jar:git-Spigot-1322]
    14. at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:562) [spigot.jar:git-Spigot-1322]
    15. at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:469) [spigot.jar:git-Spigot-1322]
    16. at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [spigot.jar:git-Spigot-1322]
    17. Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    18. at com.cheapcoders.donator.Donator.onCommand(Donator.java:435) ~[?:?]
    19. at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-1322]
    20. ... 13 more

    I tried to fix this myself but everything ive tried has not worked this is my command code
    Command Code:
    Code:java
    1. @Override
    2. public boolean onCommand(CommandSender cs, Command cmnd, String string, String[] strings) {
    3. if (cmnd.getName().equalsIgnoreCase("donate")) {
    4. if (strings.length == 0) {
    5. cs.sendMessage("§b[C§cC§2 Donator] §5General Info.");
    6. cs.sendMessage("§bBase Command for CC Donator");
    7. }

    Im not sure what else i didn't add in correctly Any help will be greatly appreciated, Thank You.
     
  2. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    This is a support forum for Bukkit and CraftBukkit. We do not support unofficial builds. Seek support where you acquired your mod.
     
Thread Status:
Not open for further replies.

Share This Page