Mark BentoBoxEvent getHandler methods as deprecated.

See https://github.com/BentoBoxWorld/BentoBox/pull/1615
This commit is contained in:
tastybento 2020-12-24 12:06:30 -08:00
parent aec2e115eb
commit f5b2b136e9

View File

@ -18,6 +18,7 @@ import world.bentobox.bentobox.BentoBox;
* Provides the default methods expected when extending {@link Event}. * Provides the default methods expected when extending {@link Event}.
* @author tastybento * @author tastybento
* @since 1.5.3 * @since 1.5.3
*
*/ */
public abstract class BentoBoxEvent extends Event { public abstract class BentoBoxEvent extends Event {
@ -40,11 +41,25 @@ public abstract class BentoBoxEvent extends Event {
super(async); super(async);
} }
/**
* @return HandlerList
* @deprecated this method will no longer be in future versions of the BentoBoxEvent.
* Each event must declare its own static handler and handler methods.
* Will be removed by https://github.com/BentoBoxWorld/BentoBox/pull/1615
*/
@Override @Override
@Deprecated
public HandlerList getHandlers() { public HandlerList getHandlers() {
return getHandlerList(); return getHandlerList();
} }
/**
* @return HandlerList
* @deprecated this method will no longer be in future versions of the BentoBoxEvent.
* Each event must declare its own static handler and handler methods.
* Will be removed by https://github.com/BentoBoxWorld/BentoBox/pull/1615
*/
@Deprecated
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }