Class PlayerSetting<T>
java.lang.Object
me.gamercoder215.starcosmetics.api.player.PlayerSetting<T>
- Type Parameters:
T- Setting Type
Represents a setting available to players.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents a Hologram Format.static enumEnum used to determine the Velocity Power ofSTRUCTURE_VELOCITY. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PlayerSetting<DyeColor>The color of the armor when using emotes.static final PlayerSetting<PlayerSetting.HologramFormat>The color/bold format for the Hologram.static final PlayerSetting<Boolean>Whether the player should receive chat notifications.static final PlayerSetting<ParticleReducer>How much to reduce particles by.static final PlayerSetting<PetCosmetics>What cosmetics the player's pets should have.static final PlayerSetting<PetPosition>Where the player's pet should be placed.static final PlayerSetting<Boolean>Whether the player should receive sound notifications.static final PlayerSetting<PlayerSetting.VelocityPower>How much the player should be launched when spawning a structure, to "avoid" suffocation. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable PlayerSetting<?>Fetches a Setting by its ID.booleanFetches the default value of this setting.@NotNull StringFetches the setting's description.@NotNull StringFetches the setting's display name.@NotNull StringgetId()Fetches the Setting's ID.Fetches all of the possible values for this setting.static <T> TgetSettingValue(@NotNull Player p, @NotNull PlayerSetting<T> setting) Fetches the setting value off of a Player.getType()Fetches the Setting Type.inthashCode()static @NotNull PlayerSetting<?>[]values()Creates an array of all of the Settings.
-
Field Details
-
NOTIFICATIONS
Whether the player should receive chat notifications. -
SOUND_NOTIFICATIONS
Whether the player should receive sound notifications. -
STRUCTURE_VELOCITY
How much the player should be launched when spawning a structure, to "avoid" suffocation. -
PET_POSITION
Where the player's pet should be placed. -
PET_COSMETICS
What cosmetics the player's pets should have. -
HOLOGRAM_FORMAT
The color/bold format for the Hologram. -
PARTICLE_REDUCTION
How much to reduce particles by. -
EMOTE_COLOR
The color of the armor when using emotes.
-
-
Method Details
-
getDefaultValue
Fetches the default value of this setting.- Returns:
- Default Value
-
getId
Fetches the Setting's ID.- Returns:
- Setting ID
-
getType
Fetches the Setting Type.- Returns:
- Setting Type
-
getPossibleValues
Fetches all of the possible values for this setting.- Returns:
- List of Possible Values
-
getSettingValue
public static <T> T getSettingValue(@NotNull @NotNull Player p, @NotNull @NotNull PlayerSetting<T> setting) throws IllegalArgumentException Fetches the setting value off of a Player.- Type Parameters:
T- Setting Type- Parameters:
p- Player to fetch fromsetting- Setting to fetch- Returns:
- Setting Value
- Throws:
IllegalArgumentException- if player or setting is null
-
getDisplayName
Fetches the setting's display name.- Returns:
- Setting Display Name
-
getDescription
Fetches the setting's description.- Returns:
- Setting Description
-
values
Creates an array of all of the Settings.- Returns:
- Setting Values Array
-
byId
Fetches a Setting by its ID.- Parameters:
id- Setting ID- Returns:
- Setting
-
equals
-
hashCode
public int hashCode()
-