Class Changer.ChangerUtils

java.lang.Object
ch.njol.skript.classes.Changer.ChangerUtils
Enclosing interface:
Changer<T>

public abstract static class Changer.ChangerUtils extends Object
  • Constructor Details

    • ChangerUtils

      public ChangerUtils()
  • Method Details

    • change

      public static <T> void change(@NotNull @NotNull Changer<T> changer, Object[] what, Object @Nullable [] delta, Changer.ChangeMode mode)
    • acceptsChange

      public static boolean acceptsChange(@NotNull @NotNull Expression<?> expression, Changer.ChangeMode mode, Class<?>... types)
      Tests whether an expression accepts changes of a certain type. If multiple types are given it test for whether any of the types is accepted.
      Parameters:
      expression - The expression to test
      mode - The ChangeMode to use in the test
      types - The types to test for
      Returns:
      Whether expression.change(event, type[], mode) can be used or not.
    • acceptsChangeTypes

      public static boolean acceptsChangeTypes(Class<?>[] validTypes, Class<?> @NotNull ... types)
      Tests whether any of the given types is accepted by the given array of valid types.
      Parameters:
      validTypes - The valid types. All array classes should be unwrapped to their component type before calling.
      types - The types to test for
      Returns:
      Whether any of the types is accepted by the valid types.