Record Class IpBanlistService.IpBanDto
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.IpBanlistService.IpBanDto
- Enclosing class:
IpBanlistService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<IpBanlistService.IpBanDto> The field for theexpiresrecord component.private final StringThe field for theiprecord 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 IpBanlistService.IpBanDtostatic IpBanlistService.IpBanDtofrom(IpBanListEntry ban) final inthashCode()Returns a hash code value for this object.ip()Returns the value of theiprecord component.reason()Returns the value of thereasonrecord component.source()Returns the value of thesourcerecord component.private IpBanlistService.IpBantoIpBan()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ip
The field for theiprecord component. -
reason
-
source
-
expires
-
CODEC
-
-
Constructor Details
-
IpBanDto
public IpBanDto(String ip, Optional<String> reason, Optional<String> source, Optional<Instant> expires) Creates an instance of aIpBanDtorecord class.- Parameters:
ip- the value for theiprecord componentreason- the value for thereasonrecord componentsource- the value for thesourcerecord componentexpires- the value for theexpiresrecord component
-
-
Method Details
-
from
-
from
-
toIpBan
-
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). -
ip
Returns the value of theiprecord component.- Returns:
- the value of the
iprecord component
-
reason
-
source
-
expires
-