public void registerEvents(Plugin plugin, EventListener listener) {
        for (Method method : listener.getClass().getMethods()) {
            Annotation annotation = method.getAnnotation(EventHandler.class);

            if (annotation == null)
                continue;

            Class[] params = method.getParameterTypes();

            if (params.length != 1)
                continue;

            Class eventType = params[0];

            if (!(eventType.getSuperclass().equals(Event.class)))
                continue;

            if (!this.handlers.containsKey(plugin))
                this.handlers.put(eventType, new ArrayList<EventHandlerInfo>());

            this.handlers.get(eventType).add(new EventHandlerInfo(
                plugin,
                listener,
                method
            ));
        }
    }