@EventHandler
    public void onTimeBanEvent(TimeBanBanEvent event) {
        String admin;
        if (event.getSender() != null && event.isSenderPlayer()) {
            admin = event.getSender().getDisplayName();
        } else {
            admin = "console";
        }

        // get ban
        Ban b = event.getBan();
        String player = b.getPlayer().getName();
        Date bannedUntil = b.getUntil().getTime();

        // prepare map with substitutions
        HashMap<String, String> values = new HashMap<String, String>(3);
        values.put("{user}", player);
        values.put("{until}", bannedUntil.toString());
        values.put("{admin}", admin);

        // ban player
        boolean successfull = plugin.getController().executeBan(b);
        if (successfull) {
            String serverMessage = MessagesUtil.formatMessage("ban_result_console", values);
            log.log(Level.INFO, "[TimeBan] {0}", serverMessage);

            if (event.isSenderPlayer()) {
                String message = MessagesUtil.formatMessage("ban_result", values);
                event.getSender().sendMessage(message);
            }
        } else {
            String message = MessagesUtil.formatMessage("ban_error", values);
            log.log(Level.INFO, "[TimeBan] {0}", message);

            if (event.isSenderPlayer()) {
                event.getSender().sendMessage(message);
            }
        }
    }