Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- checkServerVersionCompatibility(SemverRange, String)
- getGroup()
- getName()
- getVersion()
- getDescription()
- getAuthors()
- getWebsite()
- setGroup(String)
- setName(String)
- setVersion(Semver)
- setDescription(String)
- setAuthors(List)
- setWebsite(String)
- getMain()
- getServerVersion()
- setServerVersion(SemverRange)
- getDependencies()
- getOptionalDependencies()
- getLoadBefore()
- isDisabledByDefault()
- includesAssetPack()
- getSubPlugins()
- inherit(PluginManifest)
- toString()
- corePlugin(Class)
Class PluginManifest
java.lang.Object
com.hypixel.hytale.common.plugin.PluginManifest
Represents the manifest of a plugin, including the name, version, authors and more.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for plugin manifests of a core pluginstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<PluginManifest[]> The codec used to parse arrays ofPluginManifestinstances.static final Codec<PluginManifest> The codec used to parsePluginManifestinstances.static final StringThe core group name used by official plugins. -
Constructor Summary
ConstructorsConstructorDescriptionAn empty constructor for aPluginManifestinstance.PluginManifest(String group, String name, Semver version, String description, List<AuthorInfo> authors, String website, String main, SemverRange serverVersion, Map<PluginIdentifier, SemverRange> dependencies, Map<PluginIdentifier, SemverRange> optionalDependencies, Map<PluginIdentifier, SemverRange> loadBefore, List<PluginManifest> subPlugins, boolean disabledByDefault) Default Constructor for aPluginManifestinstance. -
Method Summary
Modifier and TypeMethodDescriptioncheckServerVersionCompatibility(SemverRange range, String serverVersionStr) static PluginManifest.CoreBuildercorePlugin(Class<?> pluginClass) Creates a new core builder instance for the provided plugin classgetGroup()getMain()getName()The server version range that this plugin is compatible with.booleanvoidinherit(PluginManifest manifest) booleanvoidsetAuthors(List<AuthorInfo> authors) Sets the authors of the pluginvoidsetDescription(String description) Sets the description of the pluginvoidSets the group of the pluginvoidSets the name of the pluginvoidsetServerVersion(SemverRange serverVersion) voidsetVersion(Semver version) Sets the version of the pluginvoidsetWebsite(String website) Sets the website of the plugintoString()
-
Field Details
-
CODEC
The codec used to parsePluginManifestinstances. -
ARRAY_CODEC
The codec used to parse arrays ofPluginManifestinstances. -
CORE_GROUP
-
-
Constructor Details
-
PluginManifest
public PluginManifest()An empty constructor for aPluginManifestinstance.Used by the affiliated codec to instantiate plugin manifest instances.
-
PluginManifest
public PluginManifest(@Nonnull String group, @Nonnull String name, @Nonnull Semver version, @Nullable String description, @Nonnull List<AuthorInfo> authors, @Nullable String website, @Nullable String main, @Nonnull SemverRange serverVersion, @Nonnull Map<PluginIdentifier, SemverRange> dependencies, @Nonnull Map<PluginIdentifier, SemverRange> optionalDependencies, @Nonnull Map<PluginIdentifier, SemverRange> loadBefore, @Nonnull List<PluginManifest> subPlugins, boolean disabledByDefault) Default Constructor for aPluginManifestinstance.- Parameters:
group- The group of the plugin.name- The name of the plugin.version- The version of the plugin.description- The plugins description.authors- Authors associated with the plugin.website- The website associated with the plugin.main- A path to the main class of the plugin.serverVersion- The server version required for the plugin.dependencies- Dependencies required for the plugin.optionalDependencies- Optional dependencies for the plugin.loadBefore- Plugins this plugin should load before (soft ordering).subPlugins- The manifests of sub-plugins for this plugin.disabledByDefault- Whether the plugin should be disabled by default.
-
-
Method Details
-
checkServerVersionCompatibility
@Nonnull public static PluginManifest.ServerVersionCheck checkServerVersionCompatibility(@Nullable SemverRange range, @Nullable String serverVersionStr) -
getGroup
- Returns:
- the group identifier for the plugin.
-
getName
- Returns:
- the name of the plugin.
-
getVersion
- Returns:
- the semver version.
-
getDescription
- Returns:
- the description.
-
getAuthors
- Returns:
- the list of authors of the plugin.
-
getWebsite
- Returns:
- the website of the plugin, or
nullif not specified.
-
setGroup
Sets the group of the plugin- Parameters:
group- the group to set
-
setName
Sets the name of the plugin- Parameters:
name- the name to set
-
setVersion
Sets the version of the plugin- Parameters:
version- the version to set
-
setDescription
Sets the description of the plugin- Parameters:
description- the description to set
-
setAuthors
Sets the authors of the plugin- Parameters:
authors- the authors to set
-
setWebsite
Sets the website of the plugin- Parameters:
website- the website to set
-
getMain
- Returns:
- the main class of the plugin, or
nullif not specified.
-
getServerVersion
The server version range that this plugin is compatible with. -
setServerVersion
-
getDependencies
- Returns:
- the map of dependencies required by this plugin.
-
getOptionalDependencies
- Returns:
- the map of optional dependencies for this plugin.
-
getLoadBefore
- Returns:
- the map of plugins this plugin should load before (soft ordering constraint).
-
isDisabledByDefault
public boolean isDisabledByDefault()- Returns:
trueif the plugin is disabled by default,falseotherwise.
-
includesAssetPack
public boolean includesAssetPack()- Returns:
trueif the plugin includes an asset pack,falseotherwise.
-
getSubPlugins
- Returns:
- a list of plugin manifests of the sub-plugins for this manifest.
-
inherit
-
toString
-
corePlugin
Creates a new core builder instance for the provided plugin class- Parameters:
pluginClass- The class of the plugin that we are creating this core builder for- Returns:
- the newly created core builder instance
-