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 givenPluginPlatformsMulti(@NotNull PluginPlatform.Multi multi) Copy constructor -
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<PluginPlatform> get(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatformfor the givenPluginPlatform.PlatformgetIdentifier(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platformstatic @NotNull TreeSet<PluginPlatform> load(@NotNull com.google.gson.JsonObject json) Loads aPluginPlatform.Multifrom the givenJsonObjectstatic @NotNull PluginPlatform.MultiLoads aPluginPlatform.Multifrom the givenConfigurationSectionbooleanremove(@NotNull PluginPlatform.Platform platforms) Removes thePluginPlatformfor 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
-
Multi
Copy constructor
-
-
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
-
load
@NotNull public static @NotNull TreeSet<PluginPlatform> load(@NotNull @NotNull com.google.gson.JsonObject json) Loads aPluginPlatform.Multifrom the givenJsonObject -
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
-
remove
Removes thePluginPlatformfor the givenplatforms- Parameters:
platforms- thePluginPlatform.Platformto remove theplugin platformsfor- Returns:
- whether a
plugin platformwas removed
-
toString
- Overrides:
toStringin classxyz.srnyx.javautilities.parents.Stringable
-