Record Class IpBanlistService.IncomingIpBanDto
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.IpBanlistService.IncomingIpBanDto
- Enclosing class:
IpBanlistService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<IpBanlistService.IncomingIpBanDto> The field for theexpiresrecord component.The field for theiprecord component.The 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.final inthashCode()Returns a hash code value for this object.ip()Returns the value of theiprecord component.player()Returns the value of theplayerrecord component.reason()Returns the value of thereasonrecord component.source()Returns the value of thesourcerecord component.(package private) IpBanlistService.IpBantoIpBan()(package private) IpBanlistService.IpBantoIpBan(ServerPlayer pPlayer) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
player
The field for theplayerrecord component. -
ip
The field for theiprecord component. -
reason
The field for thereasonrecord component. -
source
The field for thesourcerecord component. -
expires
The field for theexpiresrecord component. -
CODEC
-
-
Constructor Details
-
IncomingIpBanDto
public IncomingIpBanDto(Optional<PlayerDto> player, Optional<String> ip, Optional<String> reason, Optional<String> source, Optional<Instant> expires) Creates an instance of aIncomingIpBanDtorecord class.- Parameters:
player- the value for theplayerrecord componentip- the value for theiprecord componentreason- the value for thereasonrecord componentsource- the value for thesourcerecord componentexpires- the value for theexpiresrecord component
-
-
Method Details
-
toIpBan
-
toIpBan
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
-
ip
Returns the value of theiprecord component.- Returns:
- the value of the
iprecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
expires
Returns the value of theexpiresrecord component.- Returns:
- the value of the
expiresrecord component
-