Record Class Message.Scoreboard
java.lang.Object
java.lang.Record
net.flectone.pulse.config.Message.Scoreboard
- All Implemented Interfaces:
EnableSetting
- Enclosing class:
Message
public static record Message.Scoreboard(Boolean enable, Boolean nameVisible, double nameDistance, Boolean hideNameWhenSneaking, String color, Ticker ticker, Message.Scoreboard.Objective objective)
extends Record
implements EnableSetting
- Since:
- 1.7.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic class -
Constructor Summary
ConstructorsConstructorDescriptionScoreboard(Boolean enable, Boolean nameVisible, double nameDistance, Boolean hideNameWhenSneaking, String color, Ticker ticker, Message.Scoreboard.Objective objective) Creates an instance of aScoreboardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()color()Returns the value of thecolorrecord component.enable()Returns the value of theenablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehideNameWhenSneakingrecord component.doubleReturns the value of thenameDistancerecord component.Returns the value of thenameVisiblerecord component.Returns the value of theobjectiverecord component.ticker()Returns the value of thetickerrecord component.final StringtoString()Returns a string representation of this record class.withEnable(Boolean enable) withHideNameWhenSneaking(Boolean hideNameWhenSneaking) withNameDistance(double nameDistance) withNameVisible(Boolean nameVisible) withObjective(Message.Scoreboard.Objective objective) withTicker(Ticker ticker)
-
Constructor Details
-
Scoreboard
public Scoreboard(Boolean enable, Boolean nameVisible, double nameDistance, Boolean hideNameWhenSneaking, String color, Ticker ticker, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message/scoreboard/objective") Message.Scoreboard.Objective objective) Creates an instance of aScoreboardrecord class.- Parameters:
enable- the value for theenablerecord componentnameVisible- the value for thenameVisiblerecord componentnameDistance- the value for thenameDistancerecord componenthideNameWhenSneaking- the value for thehideNameWhenSneakingrecord componentcolor- the value for thecolorrecord componentticker- the value for thetickerrecord componentobjective- the value for theobjectiverecord component
-
-
Method Details
-
builder
-
toBuilder
-
withEnable
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withNameVisible
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withNameDistance
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHideNameWhenSneaking
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withColor
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTicker
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withObjective
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
enable
Returns the value of theenablerecord component.- Specified by:
enablein interfaceEnableSetting- Returns:
- the value of the
enablerecord component
-
nameVisible
Returns the value of thenameVisiblerecord component.- Returns:
- the value of the
nameVisiblerecord component
-
nameDistance
public double nameDistance()Returns the value of thenameDistancerecord component.- Returns:
- the value of the
nameDistancerecord component
-
hideNameWhenSneaking
Returns the value of thehideNameWhenSneakingrecord component.- Returns:
- the value of the
hideNameWhenSneakingrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
ticker
Returns the value of thetickerrecord component.- Returns:
- the value of the
tickerrecord component
-
objective
@JsonPropertyDescription(" https://flectone.net/pulse/docs/message/scoreboard/objective") public Message.Scoreboard.Objective objective()Returns the value of theobjectiverecord component.- Returns:
- the value of the
objectiverecord component
-