Class Utils

java.lang.Object
org.geysermc.event.bus.impl.util.Utils

public final class Utils extends Object
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • isEventCancelled

      public static boolean isEventCancelled(Object event)
    • shouldCallSubscriber

      public static boolean shouldCallSubscriber(Subscriber<?> subscriber, Object event)
    • ancestorsThatUse

      public static Set<Class<?>> ancestorsThatUse(Class<?> clazz, Class<?> use)
      Looks at all the superclasses and superinterfaces of a given class and checks if it is assignable from the given base class. Superclasses and superinterfaces of the base class and the base class itself are not included in the result, but the given class is included if a super type is assignable.
      Parameters:
      clazz - the class to look at
      use - the base class