Package org.spongepowered.api.map.color
Interface MapColor
-
- All Superinterfaces:
DataSerializable
public interface MapColor extends DataSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MapColor.Builder
Builds aMapColor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static MapColor.Builder
builder()
Creates aMapColor.Builder
for generating a newMapColor
.Color
color()
static MapColor
of(java.util.function.Supplier<MapColorType> mapColorTypeSupplier)
A method to ease usingMapColorTypes
enumeration.static MapColor
of(java.util.function.Supplier<MapColorType> mapColorTypeSupplier, java.util.function.Supplier<MapShade> mapShadeSupplier)
A method to ease using theMapColorTypes
andMapShade
.static MapColor
of(MapColorType mapColorType)
static MapColor
of(MapColorType mapColorType, MapShade mapShade)
MapShade
shade()
MapColorType
type()
Gets theMapColorType
that thisMapColor
was built from.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
-
-
-
Method Detail
-
builder
static MapColor.Builder builder()
Creates aMapColor.Builder
for generating a newMapColor
.- Returns:
- The builder
-
of
static MapColor of(MapColorType mapColorType)
- Parameters:
mapColorType
- TheMapColorType
- Returns:
- The
MapColor
that represents the provided type
-
of
static MapColor of(java.util.function.Supplier<MapColorType> mapColorTypeSupplier)
A method to ease usingMapColorTypes
enumeration. Unwraps the given supplier and callsof(MapColorType)
.- Parameters:
mapColorTypeSupplier
- Supplier to unwrap.- Returns:
- The
MapColor
that represents the provided type
-
of
static MapColor of(MapColorType mapColorType, MapShade mapShade)
- Parameters:
mapColorType
- TheMapColorType
mapShade
- TheMapShade
- Returns:
- The
MapColor
that represents the provided type
-
of
static MapColor of(java.util.function.Supplier<MapColorType> mapColorTypeSupplier, java.util.function.Supplier<MapShade> mapShadeSupplier)
A method to ease using theMapColorTypes
andMapShade
. Unwraps the given suppliers and callsof(MapColorType, MapShade)
.- Parameters:
mapColorTypeSupplier
- Supplier to unwrapmapShadeSupplier
- Supplier to unwrap- Returns:
- The
MapColor
that represents the provided type.
-
type
MapColorType type()
Gets theMapColorType
that thisMapColor
was built from.- Returns:
- The
MapColorType
-
-