Interface CosmeticItemOwnership
public interface CosmeticItemOwnership
Represents an ownership/purchase of a cosmetic item.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Represents the cause of a shop item ownership. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the properties of this ownership are equal to the given one.getCause()
Gets the cause of the ownership.getDate()
Gets the date of when the ownership was granted.getItem()
Gets the item that is owned by the player.int
hashCode()
Returns the hash code of this ownership instance.static CosmeticItemOwnership
of
(CosmeticItem item, CosmeticItemOwnership.Cause cause) Constructs a new ownership instance.static CosmeticItemOwnership
of
(CosmeticItem item, CosmeticItemOwnership.Cause cause, OffsetDateTime date) Constructs a new ownership instance.
-
Method Details
-
getItem
CosmeticItem getItem()Gets the item that is owned by the player.- Returns:
- The item represented by this ownership instance
-
getCause
CosmeticItemOwnership.Cause getCause()Gets the cause of the ownership.Items may be given for other reasons than a purchase to the player.
- Returns:
- The cause
-
getDate
OffsetDateTime getDate()Gets the date of when the ownership was granted.- Returns:
- The date
-
equals
Checks whether the properties of this ownership are equal to the given one. -
hashCode
int hashCode()Returns the hash code of this ownership instance.It is guaranteed that two ownership instances with the same properties will return the same hash code.
-
of
Constructs a new ownership instance.Uses the current date as the date of when the ownership was granted.
- Parameters:
item
- The item to grant the ownership forcause
- The cause of the ownership- Returns:
- The ownership instance
- See Also:
-
of
static CosmeticItemOwnership of(CosmeticItem item, CosmeticItemOwnership.Cause cause, OffsetDateTime date) Constructs a new ownership instance.Uses the current date as the date of when the ownership was granted.
- Parameters:
item
- The item to grant the ownership forcause
- The cause of the ownershipdate
- The date of when the ownership was granted- Returns:
- The ownership instance
- See Also:
-