Solved Plugin error (i can't find the problem)

Discussion in 'Plugin Development' started by martinke123, May 31, 2014.

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

    martinke123

    I am getting a error if i do /trails

    Here is the error:

    Code:
    31.05 11:01:25 [Server] INFO ... 13 more
    31.05 11:01:25 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at com.myhubbytrails.commandhandler.CommandHandler.onCommand(CommandHandler.java:46) ~[?:?]
    31.05 11:01:25 [Server] INFO at com.myhubbytrails.commandhandler.Command.run(Command.java:64) ~[?:?]
    31.05 11:01:25 [Server] INFO at com.myhubbytrails.commandhandler.CommandTrail.run(CommandTrail.java:28) ~[?:?]
    31.05 11:01:25 [Server] INFO at com.myhubbytrails.IconMenu.open(IconMenu.java:75) ~[?:?]
    31.05 11:01:25 [Server] INFO at org.bukkit.Bukkit.createInventory(Bukkit.java:588) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.CraftServer.createInventory(CraftServer.java:1472) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom.<init>(CraftInventoryCustom.java:26) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.inventory.CraftInventoryCustom$MinecraftInventory.<init>(CraftInventoryCustom.java:48) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.apache.commons.lang.Validate.isTrue(Validate.java:157) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO Caused by: java.lang.IllegalArgumentException: Title cannot be longer than 32 characters
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:952) [craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit-beta2-os.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    31.05 11:01:25 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'trail' in plugin MyHubbyTrails v1.0
    31.05 11:01:25 [Server] ERROR null
    And here is the code where the error is in:

    Code:
    package com.myhubbytrails.commandhandler;
     
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
     
    public class CommandHandler implements CommandExecutor{
     
        private Command cmd;
     
        public CommandHandler(){
            this.cmd = new Command("/trails","/t","/tra","/trail");
            this.cmd.setRunHandler(new CommandTrail());
         
            Command help = new Command("help");
            help.setRunHandler(new CommandHelp());
            help.setPerm("trail.help");
            this.cmd.addSubCommand(help);
         
            Command reload = new Command("reload");
            reload.setRunHandler(new CommandReload());
            reload.setPerm("trail.reload");
            this.cmd.addSubCommand(reload);
         
            Command off = new Command("off");
            off.setRunHandler(new CommandOff());
            off.setPerm("trail.off");
            this.cmd.addSubCommand(off);
         
            Command list = new Command("list");
            list.setRunHandler(new CommandList());
            list.setPerm("trail.list");
            this.cmd.addSubCommand(list);
         
            Command head = new Command("head");
            head.setRunHandler(new CommandHead());
            this.cmd.addSubCommand(head);
         
            Command headoff = new Command("off");
            headoff.setRunHandler(new CommandHeadOff());
            headoff.setPerm("trail.off");
            head.addSubCommand(headoff);
        }
     
        public boolean onCommand(CommandSender sender, org.bukkit.command.Command cmd, String label, String[] args){
            if(cmd.getName().equalsIgnoreCase("trails")){
                this.cmd.run(sender, args);
            }
            return true;
        }
    }
    I hope some one can help me!
     
Thread Status:
Not open for further replies.

Share This Page