Class RegistryRegionFlag<T>

java.lang.Object
org.empirewar.orbis.flag.RegionFlag<T>
org.empirewar.orbis.flag.RegistryRegionFlag<T>
Type Parameters:
T - the type this flag has
All Implemented Interfaces:
net.kyori.adventure.key.Keyed

public final class RegistryRegionFlag<T> extends RegionFlag<T>
This base class is immutable and is stored in the OrbisRegistries.FLAGS registry. A flag may be converted to a mutable representation by using asMutable() or asGrouped() as required. The provided Supplier of RegistryRegionFlag will be used to copy a value into the mutable representation.
See Also:
  • Method Details

    • defaultValueType

      public Class<T> defaultValueType()
      Gets the class of the default value of this flag.
      Returns:
      class of the default value
    • asMutable

      public MutableRegionFlag<T> asMutable()
      Gets a mutable representation of this flag.
      Returns:
      mutable representation
    • asGrouped

      public GroupedMutableRegionFlag<T> asGrouped()
      Gets a grouped mutable representation of this flag.
      Returns:
      grouped mutable representation
    • description

      public Optional<String> description()
      Gets the description of this flag.

      This description is displayed as a tooltip when hovering over the flag name in chat or command suggestions.

      Returns:
      the description
    • builder

      public static <T> RegistryRegionFlag.Builder<T> builder()