Package xyz.srnyx.annoyingapi
Class PluginPlatform.Multi
java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.PluginPlatform.Multi
- Enclosing class:
PluginPlatform
public static class PluginPlatform.Multi
extends xyz.srnyx.javautilities.parents.Stringable
A collection of
PluginPlatforms-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull Set<PluginPlatform> ThePluginPlatformsin thisMulti -
Constructor Summary
ConstructorsConstructorDescriptionMulti()Creates a new emptyPluginPlatform.MultiMulti(@NotNull Collection<PluginPlatform> pluginPlatforms) Creates a newPluginPlatform.Multiwith the givenPluginPlatformsMulti(@NotNull PluginPlatform... pluginPlatforms) Creates a newPluginPlatform.Multiwith the givenPluginPlatforms -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(@NotNull PluginPlatform... pluginPlatforms) Adds the givenplugin platformsto thisPluginPlatform.MultibooleanaddIfAbsent(@NotNull PluginPlatform... pluginPlatforms) Adds the givenplugin platformsto thisPluginPlatform.Multiif they don't already exist@NotNull Optional<PluginPlatform> get(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatformfor the givenPluginPlatform.PlatformgetIdentifier(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platformstatic @NotNull PluginPlatform.MultiLoads aPluginPlatform.Multifrom the givenConfigurationSectionbooleanremove(@NotNull PluginPlatform.Platform... platforms) Removes theplugin platformsfor the givenplatforms@NotNull StringtoString()Methods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString
-
Field Details
-
pluginPlatforms
ThePluginPlatformsin thisMulti
-
-
Constructor Details
-
Multi
public Multi()Creates a new emptyPluginPlatform.Multi -
Multi
Creates a newPluginPlatform.Multiwith the givenPluginPlatforms- Parameters:
pluginPlatforms-pluginPlatforms
-
Multi
Creates a newPluginPlatform.Multiwith the givenPluginPlatforms- Parameters:
pluginPlatforms-pluginPlatforms
-
-
Method Details
-
load
@NotNull public static @NotNull PluginPlatform.Multi load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull @NotNull String key) Loads aPluginPlatform.Multifrom the givenConfigurationSection- Parameters:
section- theConfigurationSectionto load fromkey- the key to load from- Returns:
- the loaded
PluginPlatform.Multi
-
get
@NotNull public @NotNull Optional<PluginPlatform> get(@NotNull @NotNull PluginPlatform.Platform platform) Gets thePluginPlatformfor the givenPluginPlatform.Platform- Parameters:
platform- thePluginPlatform.Platformto get thePluginPlatformfor- Returns:
- the
PluginPlatformfor the givenPluginPlatform.Platform
-
getIdentifier
@NotNull public @NotNull Optional<String> getIdentifier(@NotNull @NotNull PluginPlatform.Platform platform) Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platform- Parameters:
platform- thePluginPlatform.Platformto get thePluginPlatform.identifierfor- Returns:
- the
PluginPlatform.identifierfor the givenPluginPlatform.Platform
-
add
Adds the givenplugin platformsto thisPluginPlatform.Multi- Parameters:
pluginPlatforms- theplugin platformsto add- Returns:
- whether a
plugin platformwas added
-
addIfAbsent
Adds the givenplugin platformsto thisPluginPlatform.Multiif they don't already exist- Parameters:
pluginPlatforms- theplugin platformsto add- Returns:
- whether a
plugin platformwas added
-
remove
Removes theplugin platformsfor the givenplatforms- Parameters:
platforms- theplatformsto remove theplugin platformsfor- Returns:
- whether a
plugin platformwas removed
-
toString
- Overrides:
toStringin classxyz.srnyx.javautilities.parents.Stringable
-