public class AnnoyingDependency
extends xyz.srnyx.javautilities.parents.Stringable
| Modifier and Type | Field and Description |
|---|---|
boolean |
enableAfterDownload
Whether to attempt to enable the dependency after it has been downloaded
|
@NotNull java.io.File |
file
The new file of the dependency (
name.jar) |
@NotNull java.lang.String |
name
The name of the dependency (from it's
plugin.yml) |
PluginPlatform.Multi |
platforms
The platforms the dependency can be downloaded from
|
boolean |
required
Whether the dependency is required to be installed.
|
| Constructor and Description |
|---|
AnnoyingDependency(@NotNull java.lang.String name,
boolean required,
boolean enableAfterDownload,
PluginPlatform... platforms)
Creates a new dependency instance
|
AnnoyingDependency(@NotNull java.lang.String name,
boolean required,
boolean enableAfterDownload,
PluginPlatform.Multi platforms)
Creates a new dependency instance
|
AnnoyingDependency(@NotNull java.lang.String name,
PluginPlatform.Multi platforms,
boolean required,
boolean enableAfterDownload)
Creates a new dependency instance
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNotInstalled()
This uses
Bukkit.getPluginManager() to check if the dependency isn't installed. |
static @NotNull AnnoyingDependency |
load(@NotNull org.bukkit.configuration.ConfigurationSection section)
Loads a dependency from a
ConfigurationSection |
static @NotNull java.util.List<AnnoyingDependency> |
loadList(@NotNull org.bukkit.configuration.ConfigurationSection section,
@NotNull java.lang.String key)
Loads a list of dependencies from a
ConfigurationSection |
@NotNull public final @NotNull java.lang.String name
plugin.yml)@NotNull public final PluginPlatform.Multi platforms
public final boolean required
This does NOT stop the dependency from being downloaded/installed
public final boolean enableAfterDownload
@NotNull public final @NotNull java.io.File file
name.jar)public AnnoyingDependency(@NotNull
@NotNull java.lang.String name,
@NotNull
PluginPlatform.Multi platforms,
boolean required,
boolean enableAfterDownload)
name - nameplatforms - platformsrequired - requiredenableAfterDownload - enableAfterDownloadpublic AnnoyingDependency(@NotNull
@NotNull java.lang.String name,
boolean required,
boolean enableAfterDownload,
@NotNull
PluginPlatform.Multi platforms)
name - namerequired - requiredenableAfterDownload - enableAfterDownloadplatforms - platformspublic AnnoyingDependency(@NotNull
@NotNull java.lang.String name,
boolean required,
boolean enableAfterDownload,
@NotNull
PluginPlatform... platforms)
name - namerequired - requiredenableAfterDownload - enableAfterDownloadplatforms - platforms@NotNull public static @NotNull AnnoyingDependency load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section)
ConfigurationSectionsection - the section to load from@NotNull public static @NotNull java.util.List<AnnoyingDependency> loadList(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull @NotNull java.lang.String key)
ConfigurationSectionsection - the section to load fromkey - the key to load frompublic boolean isNotInstalled()
Bukkit.getPluginManager() to check if the dependency isn't installed. So it's vital that name is from the plugin's plugin.yml