Record Class BanlistService.UserBanDto
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.BanlistService.UserBanDto
- Enclosing class:
BanlistService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BanlistService.UserBanDto> The field for theexpiresrecord component.private final PlayerDtoThe field for theplayerrecord component.The field for thereasonrecord component.The field for thesourcerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.expires()Returns the value of theexpiresrecord component.private static BanlistService.UserBanDtostatic BanlistService.UserBanDtofrom(UserBanListEntry entry) final inthashCode()Returns a hash code value for this object.player()Returns the value of theplayerrecord component.reason()Returns the value of thereasonrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.private BanlistService.UserBan
-
Field Details
-
player
The field for theplayerrecord component. -
reason
-
source
-
expires
-
CODEC
-
-
Constructor Details
-
UserBanDto
public UserBanDto(PlayerDto player, Optional<String> reason, Optional<String> source, Optional<Instant> expires) Creates an instance of aUserBanDtorecord class.- Parameters:
player- the value for theplayerrecord componentreason- the value for thereasonrecord componentsource- the value for thesourcerecord componentexpires- the value for theexpiresrecord component
-
-
Method Details
-
from
-
from
-
toUserBan
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
reason
-
source
-
expires
-