Record Class BanlistService.UserBan
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.BanlistService.UserBan
- Enclosing class:
BanlistService
-
Field Summary
Fields -
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.(package private) static BanlistService.UserBanfrom(UserBanListEntry pEntry) 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.(package private) UserBanListEntryfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
player
The field for theplayerrecord component. -
reason
The field for thereasonrecord component. -
source
The field for thesourcerecord component. -
expires
The field for theexpiresrecord component.
-
-
Constructor Details
-
UserBan
Creates an instance of aUserBanrecord 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
-
toBanEntry
UserBanListEntry toBanEntry() -
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
-
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
-