// Path: src/main/java/com/kit/api/event/exeption/HandlerInvocationException.java
// public class HandlerInvocationException extends RuntimeException {
// 
//     public HandlerInvocationException(String message, Throwable t) {
//         super(message, t);
//     }
// 
// }


import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.kit.api.wrappers.Loot;
import com.kit.game.engine.IBitBuffer;
import com.kit.game.engine.extension.CanvasExtension;
import org.apache.log4j.Logger;
import org.apache.log4j.net.SyslogAppender;
import com.kit.api.event.exeption.HandlerInvocationException;
import com.kit.api.wrappers.Loot;
import com.kit.core.Session;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.lang.reflect.Method;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static java.lang.reflect.Modifier.isStatic;
        private Object object;
        private Method method;

        public EventHandlerBridge(Object object, Method method) {
            this.object = object;
            this.method = method;
        }

        public Class<?> getType() {
            return method.getParameterTypes()[0];
        }

        /**
         * Checks if the method is a valid EventHandler
         *
         * @return true if it is a valid EventHandler else false.
         */
        public boolean validate() {
            return method.getParameterTypes().length == 1 && !isStatic(method.getModifiers());
        }

        /**
         * Calls the EventHandler method and passes the object as the argument.
         *
         * @param arg object to pass into the method.
         */
        public void handle(Object arg) {
            try {
                method.invoke(this.object, arg);
            } catch (Exception e) {
// Path: src/main/java/com/kit/api/event/exeption/HandlerInvocationException.java
// public class HandlerInvocationException extends RuntimeException {
// 
//     public HandlerInvocationException(String message, Throwable t) {
//         super(message, t);
//     }
// 
// }


// Path: src/main/java/com/kit/api/event/Events.java
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.kit.api.wrappers.Loot;
import com.kit.game.engine.IBitBuffer;
import com.kit.game.engine.extension.CanvasExtension;
import org.apache.log4j.Logger;
import org.apache.log4j.net.SyslogAppender;
import com.kit.api.event.exeption.HandlerInvocationException;
import com.kit.api.wrappers.Loot;
import com.kit.core.Session;
import java.awt.event.FocusEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.lang.reflect.Method;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static java.lang.reflect.Modifier.isStatic;

        private Object object;
        private Method method;

        public EventHandlerBridge(Object object, Method method) {
            this.object = object;
            this.method = method;
        }

        public Class<?> getType() {
            return method.getParameterTypes()[0];
        }

        /**
         * Checks if the method is a valid EventHandler
         *
         * @return true if it is a valid EventHandler else false.
         */
        public boolean validate() {
            return method.getParameterTypes().length == 1 && !isStatic(method.getModifiers());
        }

        /**
         * Calls the EventHandler method and passes the object as the argument.
         *
         * @param arg object to pass into the method.
         */
        public void handle(Object arg) {
            try {
                method.invoke(this.object, arg);
            } catch (Exception e) {
                throw new HandlerInvocationException("Handler invocation failed.", e);