@Override
    public boolean onCommand(CommandSender sender, Command cmd, String label,
            String[] args) {
        tickets = plugin.getTicketHandler();
        if (sender instanceof Player) {
            Player p = (Player) sender;
            if (p.hasPermission("modreq.request")) {
                if (args.length == 0) {
                    sender.sendMessage(ModReq.format(ModReq.getInstance().Messages.getString("error.message"), "", "",""));
                    return true;
                } else {
                    int ticketsfromplayer;
                    try {
                        ticketsfromplayer = tickets.getTicketsFromPlayer(p,
                                sender.getName(), Status.OPEN);
                        if (plugin.getConfig().getInt("maximum-open-tickets") > ticketsfromplayer) {
                            String message = Utils.join(args, " ", 0);
                            int id = savereq(message, sender,((Player) sender).getLocation());
                            sendMessageToAdmins(ModReq.format(ModReq.getInstance().Messages.getString("staff.all.ticket-submitted"), sender.getName(), Integer.toString(id),""));
                            p.sendMessage(ModReq.format(ModReq.getInstance().Messages.getString("player.submit"), "", "",""));
                            return true;
                        } else {
                            p.sendMessage(ModReq.format(ModReq.getInstance().Messages.getString("error.ticket.toomany"), "", "",""));
                            return true;
                        }
                    } catch (SQLException e) {
                        e.printStackTrace();
                    }

                }
            }
        }
        return false;
    }