Record Class Entitlements
java.lang.Object
java.lang.Record
lol.trq.alts.account.Entitlements
- Record Components:
products- the product ids the account holds
What an account owns, from
GET /entitlements/mcstore.
Not a boolean. The endpoint returns a set of named products, and the distinctions in it are ones an alt manager cares about: an account that owns Java outright is not the same as one entitled only through a Game Pass that can lapse, and "owns Minecraft" hides that. The raw product ids are kept so a host can read one this release has not named, and the helpers cover the common questions.
- Since:
- 0.11.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProduct id for Minecraft Bedrock.static final StringProduct id for Minecraft Dungeons.static final StringProduct id for entitlement via Xbox Game Pass (PC).static final StringProduct id for entitlement via Xbox Game Pass Ultimate.static final StringProduct id for Minecraft: Java Edition owned outright.static final StringProduct id for Minecraft Legends. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns whether the account holds no products at all — authenticated, but owns nothing.booleanReturns whether the account owns Bedrock.booleanownsJava()Returns whether the account can play Java — whether it owns it outright or is entitled through a Game Pass.booleanReturns whether the account owns Java outright, independent of any Game Pass.products()Returns the value of theproductsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns whether the account's entitlement runs through a Game Pass, which can lapse — a materially weaker claim than owning the game, and worth surfacing separately.
-
Field Details
-
PRODUCT_JAVA
Product id for Minecraft: Java Edition owned outright.- Since:
- 0.11.0
- See Also:
-
PRODUCT_BEDROCK
Product id for Minecraft Bedrock.- Since:
- 0.11.0
- See Also:
-
PRODUCT_GAME_PASS_ULTIMATE
Product id for entitlement via Xbox Game Pass Ultimate.- Since:
- 0.11.0
- See Also:
-
PRODUCT_GAME_PASS_PC
Product id for entitlement via Xbox Game Pass (PC).- Since:
- 0.11.0
- See Also:
-
PRODUCT_LEGENDS
Product id for Minecraft Legends.- Since:
- 0.11.0
- See Also:
-
PRODUCT_DUNGEONS
Product id for Minecraft Dungeons.- Since:
- 0.11.0
- See Also:
-
-
Constructor Details
-
Entitlements
-
-
Method Details
-
ownsJava
public boolean ownsJava()Returns whether the account can play Java — whether it owns it outright or is entitled through a Game Pass. This is the "can it log into a Java server" question.- Returns:
- true if Java is playable
- Since:
- 0.11.0
-
ownsJavaOutright
public boolean ownsJavaOutright()Returns whether the account owns Java outright, independent of any Game Pass.- Returns:
- true if Java is owned directly
- Since:
- 0.11.0
-
ownsBedrock
public boolean ownsBedrock()Returns whether the account owns Bedrock.- Returns:
- true if Bedrock is owned
- Since:
- 0.11.0
-
viaGamePass
public boolean viaGamePass()Returns whether the account's entitlement runs through a Game Pass, which can lapse — a materially weaker claim than owning the game, and worth surfacing separately.- Returns:
- true if entitled through a Game Pass tier
- Since:
- 0.11.0
-
isEmpty
public boolean isEmpty()Returns whether the account holds no products at all — authenticated, but owns nothing.- Returns:
- true if the product set is empty
- Since:
- 0.11.0
-
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). -
products
-