Class WXYZHandler<Type,ValueType>

java.lang.Object
org.skriptlang.skript.lang.properties.handlers.WXYZHandler<Type,ValueType>
Type Parameters:
Type - The type of the property holder
ValueType - The type of the value returned
All Implemented Interfaces:
ExpressionPropertyHandler<Type,ValueType>, PropertyHandler<Type>

public abstract class WXYZHandler<Type,ValueType> extends Object implements ExpressionPropertyHandler<Type,ValueType>
A handler for types that have W, X, Y, or Z axes. Since this handler contains state information (see the axis field), the newInstance method must be implemented to return a new instance of the handler with the same axis set.
See Also:
  • LocationClassInfo.LocationWXYZHandler
  • Field Details

  • Constructor Details

    • WXYZHandler

      public WXYZHandler()
  • Method Details

    • newInstance

      public abstract PropertyHandler<Type> newInstance()
      Description copied from interface: PropertyHandler
      Creates a new instance of this handler. If a handler does not need to store state, it can simply return this. If a handler needs to store state, it **MUST** return a new instance of itself. See
      invalid reference
      ScriptClassInfo.ScriptNameHandler
      for an example of a stateful handler.
      Specified by:
      newInstance in interface PropertyHandler<Type>
      Returns:
      A new instance of this handler, or this if no state is stored.
    • supportsAxis

      public abstract boolean supportsAxis(WXYZHandler.Axis axis)
      Returns:
      Whether this handler supports the given axis
    • axis

      public void axis(WXYZHandler.Axis axis)
      Sets the specific axis for this handler to use.
      Parameters:
      axis - The axis to set
    • axis

      public WXYZHandler.Axis axis()
      Returns:
      The axis this handler is using