Package xyz.srnyx.annoyingapi
Class PluginPlatform
java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.PluginPlatform
- All Implemented Interfaces:
Comparable<PluginPlatform>
public class PluginPlatform
extends xyz.srnyx.javautilities.parents.Stringable
implements Comparable<PluginPlatform>
Contains information about a plugin on a
PluginPlatform.Platform-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA collection ofPluginPlatformsstatic enumPlatforms that plugins can be downloaded (or checked for updates) from -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull StringThe identifier of the plugin on the platformfinal @NotNull PluginPlatform.PlatformThe platform the plugin is on -
Constructor Summary
ConstructorsConstructorDescriptionPluginPlatform(@NotNull PluginPlatform.Platform platform, @NotNull String identifier) Creates a newPluginPlatform -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.BUKKITintcompareTo(@NonNull PluginPlatform o) static @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.EXTERNALstatic @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.HANGARstatic @NotNull Optional<PluginPlatform> load(@NotNull org.bukkit.configuration.ConfigurationSection section) Loads aPluginPlatformfrom aConfigurationSectionstatic @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.MANUALstatic @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.MODRINTHstatic @NotNull PluginPlatformCreates a newPluginPlatformforPluginPlatform.Platform.SPIGOTMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toString
-
Field Details
-
platform
The platform the plugin is on -
identifier
The identifier of the plugin on the platform
-
-
Constructor Details
-
PluginPlatform
public PluginPlatform(@NotNull @NotNull PluginPlatform.Platform platform, @NotNull @NotNull String identifier) Creates a newPluginPlatform- Parameters:
platform-platformidentifier-identifier
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<PluginPlatform>
-
load
@NotNull public static @NotNull Optional<PluginPlatform> load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section) Loads aPluginPlatformfrom aConfigurationSection- Parameters:
section- the section to load from- Returns:
- the loaded
PluginPlatform
-
modrinth
Creates a newPluginPlatformforPluginPlatform.Platform.MODRINTH- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-
hangar
Creates a newPluginPlatformforPluginPlatform.Platform.HANGAR- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-
spigot
Creates a newPluginPlatformforPluginPlatform.Platform.SPIGOT- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-
bukkit
Creates a newPluginPlatformforPluginPlatform.Platform.BUKKIT- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-
external
Creates a newPluginPlatformforPluginPlatform.Platform.EXTERNAL- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-
manual
Creates a newPluginPlatformforPluginPlatform.Platform.MANUAL- Parameters:
identifier-identifier- Returns:
- a new
PluginPlatform
-