Package xyz.srnyx.annoyingapi.options
Class BStatsOptions
- java.lang.Object
-
- xyz.srnyx.javautilities.parents.Stringable
-
- xyz.srnyx.annoyingapi.options.BStatsOptions
-
public class BStatsOptions extends xyz.srnyx.javautilities.parents.StringableRepresents the options for bStats
-
-
Field Summary
Fields Modifier and Type Field Description @NotNull java.lang.StringfileNameREQUIREDThe name of the file to use for the bStats toggleAnnoyingResource.OptionsfileOptions@Nullable java.lang.IntegeridRECOMMENDEDThe ID of the plugin on bStats@NotNull java.lang.StringtoggleKeyOPTIONALThe key for the node people can change to toggle bStats in thebStatsfile
-
Constructor Summary
Constructors Constructor Description BStatsOptions()Constructs a newBStatsOptionsinstance with default values
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull BStatsOptionsfileName(@NotNull java.lang.String fileName)SetsfileName@NotNull BStatsOptionsfileOptions(@NotNull java.util.function.Consumer<AnnoyingResource.Options> consumer)SetsfileOptionsusing the specifiedConsumer@NotNull BStatsOptionsfileOptions(AnnoyingResource.Options fileOptions)SetsfileOptions@NotNull BStatsOptionsid(@Nullable java.lang.Integer id)Setsidstatic @NotNull BStatsOptionsload(@NotNull org.bukkit.configuration.ConfigurationSection section)Loads the options from the specifiedConfigurationSection@NotNull BStatsOptionstoggleKey(@NotNull java.lang.String toggleKey)SetstoggleKey
-
-
-
Field Detail
-
id
@Nullable public @Nullable java.lang.Integer id
-
fileName
@NotNull public @NotNull java.lang.String fileName
REQUIREDThe name of the file to use for the bStats toggleThis is required as bStats requires a way to disable metrics. Tampering with this in such a way that removes the ability to disable metrics will result in your plugin being banned from bStats
IF YOU CHANGE THIS: The file MUST have
toggleKeyfor abooleanto toggle bStats. If it doesn't, bStats will always be disabled
-
fileOptions
@Nullable public AnnoyingResource.Options fileOptions
-
toggleKey
@NotNull public @NotNull java.lang.String toggleKey
OPTIONALThe key for the node people can change to toggle bStats in thebStatsfile
-
-
Constructor Detail
-
BStatsOptions
public BStatsOptions()
Constructs a newBStatsOptionsinstance with default values
-
-
Method Detail
-
load
@NotNull public static @NotNull BStatsOptions 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
-
id
@NotNull public @NotNull BStatsOptions id(@Nullable @Nullable java.lang.Integer id)
Setsid- Parameters:
id- the newid- Returns:
- the
BStatsOptionsinstance for chaining
-
fileName
@NotNull public @NotNull BStatsOptions fileName(@NotNull @NotNull java.lang.String fileName)
SetsfileName- Parameters:
fileName- the newfileName- Returns:
- the
BStatsOptionsinstance for chaining
-
fileOptions
@NotNull public @NotNull BStatsOptions fileOptions(@Nullable AnnoyingResource.Options fileOptions)
SetsfileOptions- Parameters:
fileOptions- the newfileOptions- Returns:
- the
BStatsOptionsinstance for chaining
-
fileOptions
@NotNull public @NotNull BStatsOptions fileOptions(@NotNull @NotNull java.util.function.Consumer<AnnoyingResource.Options> consumer)
SetsfileOptionsusing the specifiedConsumer- Parameters:
consumer- theConsumerto accept the newfileOptions- Returns:
- the
BStatsOptionsinstance for chaining
-
toggleKey
@NotNull public @NotNull BStatsOptions toggleKey(@NotNull @NotNull java.lang.String toggleKey)
SetstoggleKey- Parameters:
toggleKey- the newtoggleKey- Returns:
- the
BStatsOptionsinstance for chaining
-
-