Package xyz.srnyx.annoyingapi.options
Class PluginOptions
java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.options.PluginOptions
public class PluginOptions
extends xyz.srnyx.javautilities.parents.Stringable
Represents the general options for the plugin
-
Field Summary
FieldsModifier and TypeFieldDescription@NotNull List<AnnoyingDependency> OPTIONALTheAnnoyingDependenciesto check for (add dependencies to this in the plugin's constructor)@NotNull List<AnnoyingLibrary> OPTIONALTheAnnoyingLibrariesto load before initializing the plugin
This is only needed if you have a library that is required to load before the plugin initializes, otherwise you can just load the library yourself when the plugin enables
Loading these libraries will be one of the first (if not the first) things the plugin doesRECOMMENDEDThe differentplatformsthe plugin is available on -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PluginOptionsdependencies(@NotNull Collection<AnnoyingDependency> dependencies) Adds the specifiedAnnoyingDependencys todependencies@NotNull PluginOptionsdependencies(@NotNull AnnoyingDependency... dependencies) Adds the specifiedAnnoyingDependencys todependencies@NotNull PluginOptionslibraries(@NotNull Collection<AnnoyingLibrary> libraries) Adds the specifiedAnnoyingLibrarys tolibraries@NotNull PluginOptionslibraries(@NotNull AnnoyingLibrary... libraries) Adds the specifiedAnnoyingLibrarys tolibrariesstatic @NotNull PluginOptionsload(@NotNull org.bukkit.configuration.ConfigurationSection section) Loads the options from the specifiedConfigurationSection@NotNull PluginOptionsupdatePlatforms(@NotNull Collection<PluginPlatform> updatePlatforms) SetsupdatePlatforms@NotNull PluginOptionsupdatePlatforms(@NotNull PluginPlatform... updatePlatforms) SetsupdatePlatforms@NotNull PluginOptionsupdatePlatforms(PluginPlatform.Multi updatePlatforms) SetsupdatePlatformsMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toString
-
Field Details
-
libraries
OPTIONALTheAnnoyingLibrariesto load before initializing the plugin
This is only needed if you have a library that is required to load before the plugin initializes, otherwise you can just load the library yourself when the plugin enables
Loading these libraries will be one of the first (if not the first) things the plugin does -
dependencies
OPTIONALTheAnnoyingDependenciesto check for (add dependencies to this in the plugin's constructor)If you add a dependency to this OUTSIDE the constructor, it will not be checked
This is NOT meant for optional dependencies, all of these dependencies will be downloaded/installed (even if
AnnoyingDependency.requiredisfalse) -
updatePlatforms
RECOMMENDEDThe differentplatformsthe plugin is available onIf not specified, the plugin will not be able to check for updates
-
-
Constructor Details
-
PluginOptions
public PluginOptions()Constructs a newPluginOptionsinstance with default values
-
-
Method Details
-
load
@NotNull public static @NotNull PluginOptions load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section) Loads the options from the specifiedConfigurationSection- Parameters:
section- the section to load the options from- Returns:
- the loaded options
-
libraries
@NotNull public @NotNull PluginOptions libraries(@NotNull @NotNull Collection<AnnoyingLibrary> libraries) Adds the specifiedAnnoyingLibrarys tolibraries- Parameters:
libraries- the libraries to add- Returns:
- the
PluginOptionsinstance for chaining
-
libraries
Adds the specifiedAnnoyingLibrarys tolibraries- Parameters:
libraries- the libraries to add- Returns:
- the
PluginOptionsinstance for chaining
-
dependencies
@NotNull public @NotNull PluginOptions dependencies(@NotNull @NotNull Collection<AnnoyingDependency> dependencies) Adds the specifiedAnnoyingDependencys todependencies- Parameters:
dependencies- the dependencies to add- Returns:
- the
PluginOptionsinstance for chaining
-
dependencies
@NotNull public @NotNull PluginOptions dependencies(@NotNull @NotNull AnnoyingDependency... dependencies) Adds the specifiedAnnoyingDependencys todependencies- Parameters:
dependencies- the dependencies to add- Returns:
- the
PluginOptionsinstance for chaining
-
updatePlatforms
@NotNull public @NotNull PluginOptions updatePlatforms(@NotNull PluginPlatform.Multi updatePlatforms) SetsupdatePlatforms- Parameters:
updatePlatforms- the newupdatePlatforms- Returns:
- the
PluginOptionsinstance for chaining
-
updatePlatforms
@NotNull public @NotNull PluginOptions updatePlatforms(@NotNull @NotNull Collection<PluginPlatform> updatePlatforms) SetsupdatePlatforms- Parameters:
updatePlatforms- the newupdatePlatforms- Returns:
- the
PluginOptionsinstance for chaining
-
updatePlatforms
@NotNull public @NotNull PluginOptions updatePlatforms(@NotNull @NotNull PluginPlatform... updatePlatforms) SetsupdatePlatforms- Parameters:
updatePlatforms- the newupdatePlatforms- Returns:
- the
PluginOptionsinstance for chaining
-