Class MutableRegionFlag<T>

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

public sealed class MutableRegionFlag<T> extends RegionFlag<T> permits GroupedMutableRegionFlag<T>
Represents a flag that has a changeable MutableRegionFlag value.

This flag is added to a Region.

A RegistryRegionFlag may be converted to a Mutable instance by calling RegistryRegionFlag.asMutable().

See Also:
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<MutableRegionFlag<?>> CODEC
    • TYPE_CODEC

      public static final com.mojang.serialization.Codec<MutableRegionFlag<?>> TYPE_CODEC
  • Method Details

    • getValue

      public T getValue()
    • setValue

      public void setValue(T value)
    • getType

      public RegionFlagType<?> getType()
    • getCodec

      public com.mojang.serialization.MapCodec<? extends MutableRegionFlag<T>> getCodec(RegistryRegionFlag<?> registry)
      Description copied from class: RegionFlag
      Gets the codec for this flag.

      The parameter provided is the instance of this flag type in the OrbisRegistries.FLAGS registry. This allows for transformation within the codec to occur.

      Overrides:
      getCodec in class RegionFlag<T>
      Parameters:
      registry - the registry value of this flag
      Returns:
      the codec