Record Class GameEventService.ActiveGameEvent
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.gameevent.GameEventService.ActiveGameEvent
- Enclosing interface:
GameEventService
-
Constructor Summary
ConstructorsConstructorDescriptionActiveGameEvent(@NotNull net.kyori.adventure.key.Key key, @NotNull String displayName, int secondsRemaining, int totalDurationSeconds) Creates an instance of aActiveGameEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull net.kyori.adventure.key.Keykey()Returns the value of thekeyrecord component.intReturns the value of thesecondsRemainingrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalDurationSecondsrecord component.
-
Constructor Details
-
ActiveGameEvent
public ActiveGameEvent(@NotNull @NotNull net.kyori.adventure.key.Key key, @NotNull @NotNull String displayName, int secondsRemaining, int totalDurationSeconds) Creates an instance of aActiveGameEventrecord class.- Parameters:
key- the value for thekeyrecord componentdisplayName- the value for thedisplayNamerecord componentsecondsRemaining- the value for thesecondsRemainingrecord componenttotalDurationSeconds- the value for thetotalDurationSecondsrecord component
-
-
Method Details
-
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. -
key
@NotNull public @NotNull net.kyori.adventure.key.Key key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
secondsRemaining
public int secondsRemaining()Returns the value of thesecondsRemainingrecord component.- Returns:
- the value of the
secondsRemainingrecord component
-
totalDurationSeconds
public int totalDurationSeconds()Returns the value of thetotalDurationSecondsrecord component.- Returns:
- the value of the
totalDurationSecondsrecord component
-