Record Class GuideDefinition
java.lang.Object
java.lang.Record
ke.ric.api.guide.GuideDefinition
public record GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, Function<org.bukkit.entity.Player, GuidePage> page, String permission, BiFunction<org.bukkit.entity.Player, String, GuidePage> routes, GuideDefinition.PageResolver pages)
extends Record
Immutable addon-owned data suppliers; only registration retains these callbacks.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, String permission, BiFunction<org.bukkit.entity.Player, String, GuidePage> routes) GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, String permission, GuideDefinition.PageResolver pages) GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, Function<org.bukkit.entity.Player, GuidePage> page) GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, Function<org.bukkit.entity.Player, GuidePage> page, String permission, BiFunction<org.bukkit.entity.Player, String, GuidePage> routes) GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, Function<org.bukkit.entity.Player, GuidePage> page, String permission, BiFunction<org.bukkit.entity.Player, String, GuidePage> routes, GuideDefinition.PageResolver pages) Creates an instance of aGuideDefinitionrecord class. -
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.Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem()Returns the value of thehubItemrecord component.id()Returns the value of theidrecord component.intorder()Returns the value of theorderrecord component.page()Returns the value of thepagerecord component.pages()Returns the value of thepagesrecord component.Returns the value of thepermissionrecord component.resolve(org.bukkit.entity.Player player, String route, GuidePageRequest request) BiFunction<org.bukkit.entity.Player, String, GuidePage> routes()Returns the value of theroutesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GuideDefinition
-
GuideDefinition
public GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, String permission, GuideDefinition.PageResolver pages) -
GuideDefinition
-
GuideDefinition
-
GuideDefinition
public GuideDefinition(String id, int order, Function<org.bukkit.entity.Player, org.bukkit.inventory.ItemStack> hubItem, Function<org.bukkit.entity.Player, GuidePage> page, String permission, BiFunction<org.bukkit.entity.Player, String, GuidePage> routes, GuideDefinition.PageResolver pages) Creates an instance of aGuideDefinitionrecord class.- Parameters:
id- the value for theidrecord componentorder- the value for theorderrecord componenthubItem- the value for thehubItemrecord componentpage- the value for thepagerecord componentpermission- the value for thepermissionrecord componentroutes- the value for theroutesrecord componentpages- the value for thepagesrecord component
-
-
Method Details
-
resolve
-
resolve
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
order
public int order()Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-
hubItem
Returns the value of thehubItemrecord component.- Returns:
- the value of the
hubItemrecord component
-
page
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-
routes
Returns the value of theroutesrecord component.- Returns:
- the value of the
routesrecord component
-
pages
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-