Class ResourceNames
java.lang.Object
fr.robie.machineengine.api.paper.ResourceNames
How resources are named in menus (the
storage_<id>_name placeholders), as MiniMessage text:
addons name their own resources, e.g. <lang:chemical.mekanized.hydrogen> (translated on each
player's client). Without a name, the resource type's key.-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Stringof(@Nullable ResourceVariant variant) The name ofvariant, or"Empty"for no resource.static voidregister(@NotNull Function<ResourceVariant, String> namer) Adds a namer; it returnsnullfor resources it does not name.static voidunregister(@NotNull Function<ResourceVariant, String> namer)
-
Method Details
-
register
Adds a namer; it returnsnullfor resources it does not name. -
unregister
-
of
The name ofvariant, or"Empty"for no resource.
-