Interface GameRule.Builder<V>

    • Method Detail

      • name

        GameRule.Builder<V> name​(String name)
        Sets the name of the game rule.
        Parameters:
        name - The name
        Returns:
        This builder for chaining
      • valueType

        <NV> GameRule.Builder<NV> valueType​(Class<NV> valueType)
        Sets the value type.

        This must not be a raw parameterized type.

        Type Parameters:
        NV - The value type
        Parameters:
        valueType - The value type
        Returns:
        This builder, for chaining
      • valueType

        <NV> GameRule.Builder<NV> valueType​(io.leangen.geantyref.TypeToken<NV> valueType)
        Sets the value type.
        Type Parameters:
        NV - The value type
        Parameters:
        valueType - The value type
        Returns:
        This builder, for chaining
      • defaultValue

        GameRule.Builder<V> defaultValue​(V defaultValue)
        Sets the default value.

        Must be called after valueType(TypeToken).

        Parameters:
        defaultValue - The default value
        Returns:
        This builder, for chaining