Package de.geolykt.starloader.mod
Class ExtensionPrototype
java.lang.Object
de.geolykt.starloader.mod.ExtensionPrototype
- Direct Known Subclasses:
NamedExtensionPrototype
A prototype of an extension. This class is different to the DiscoveredExtension class
as it is only used within the launcher to explain whether a jar should be loaded or not.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExtensionPrototype(List<URL> originURLs) Deprecated.ExtensionPrototype(List<URL> originURLs, boolean enabled) Deprecated. -
Method Summary
-
Field Details
-
enabled
public boolean enabled -
originURLs
-
-
Constructor Details
-
ExtensionPrototype
Deprecated. -
ExtensionPrototype
@Deprecated @ScheduledForRemoval(inVersion="5.0.0") public ExtensionPrototype(List<URL> originURLs, boolean enabled) Deprecated. -
ExtensionPrototype
-
-
Method Details
-
getDefinedProperties
@Nullable @AvailableSince("4.0.0-a20240711") @Contract(pure=true) public @Nullable @UnmodifiableView Map<String,String> getDefinedProperties()Obtains the placeholder properties applicable to this extension prototype. When parsing the extension.json file of the mod backed by thisExtensionPrototype, placeholders are expanded using the key-value pairs supplied by this method. If this method returnsnull, this step shall not be performed.Placeholders have the pattern of '
${propertyKey}'. When found, the placeholder will be replaced with the corresponding value declared by the map returned by this method. If no value is present in the returned map, then the placeholder is skipped and a warning may get logged hinting at the absence of the key.This process is required as not doing so would mean that when using these placeholders in the extension.json files of mods will not get applied when launching from the IDE, which can result in crashes during the dependency resolution process.
Warning: When launching the mod outside the IDE, this feature is not present as it will only be set by the
IDELauncher.- Returns:
- A map mapping the placeholder keys to their respective values, or
nullif the process should be skipped. - Since:
- 4.0.0-a20240711
-
toString
-