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.StringableRepresents the general options for the plugin
-
-
Field Summary
Fields Modifier and Type Field Description @NotNull java.util.List<AnnoyingDependency>dependenciesOPTIONALTheAnnoyingDependenciesto check for (add dependencies to this in the plugin's constructor)PluginPlatform.MultiupdatePlatformsRECOMMENDEDThe differentplatformsthe plugin is available on
-
Constructor Summary
Constructors Constructor Description PluginOptions()Constructs a newPluginOptionsinstance with default values
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull PluginOptionsdependencies(@NotNull java.util.Collection<AnnoyingDependency> dependencies)Adds the specifiedAnnoyingDependencys todependencies@NotNull PluginOptionsdependencies(@NotNull AnnoyingDependency... dependencies)Adds the specifiedAnnoyingDependencys todependenciesstatic @NotNull PluginOptionsload(@NotNull org.bukkit.configuration.ConfigurationSection section)Loads the options from the specifiedConfigurationSection@NotNull PluginOptionsupdatePlatforms(@NotNull java.util.Collection<PluginPlatform> updatePlatforms)SetsupdatePlatforms@NotNull PluginOptionsupdatePlatforms(@NotNull PluginPlatform... updatePlatforms)SetsupdatePlatforms@NotNull PluginOptionsupdatePlatforms(PluginPlatform.Multi updatePlatforms)SetsupdatePlatforms
-
-
-
Field Detail
-
dependencies
@NotNull public @NotNull java.util.List<AnnoyingDependency> 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
@NotNull public PluginPlatform.Multi updatePlatforms
RECOMMENDEDThe differentplatformsthe plugin is available onIf not specified, the plugin will not be able to check for updates
-
-
Constructor Detail
-
PluginOptions
public PluginOptions()
Constructs a newPluginOptionsinstance with default values
-
-
Method Detail
-
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
-
dependencies
@NotNull public @NotNull PluginOptions dependencies(@NotNull @NotNull java.util.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 java.util.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
-
-