Added EventHandlerMethod wrapper for Listener and Method

This commit is contained in:
Dabo Ross 2013-09-05 21:23:59 -07:00 committed by md_5
parent 0f06b2c4e0
commit 53a6bb1dee

View File

@ -0,0 +1,25 @@
package net.md_5.bungee.event;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
*
* @author daboross
*/
@AllArgsConstructor
public class EventHandlerMethod
{
@Getter
private final Object listener;
@Getter
private final Method method;
public void invoke(Object event) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
{
method.invoke( listener, event );
}
}