public class BStatsOptions
extends xyz.srnyx.javautilities.parents.Stringable
| Modifier and Type | Field and Description |
|---|---|
@NotNull java.lang.String |
fileName
REQUIRED The name of the file to use for the bStats toggle |
AnnoyingResource.Options |
fileOptions
|
@Nullable java.lang.Integer |
id
RECOMMENDED The ID of the plugin on bStats |
@NotNull java.lang.String |
toggleKey
OPTIONAL The key for the node people can change to toggle bStats in the bStats file |
| Constructor and Description |
|---|
BStatsOptions()
Constructs a new
BStatsOptions instance with default values |
| Modifier and Type | Method and Description |
|---|---|
@NotNull BStatsOptions |
fileName(@NotNull java.lang.String fileName)
Sets
fileName |
@NotNull BStatsOptions |
fileOptions(AnnoyingResource.Options fileOptions)
Sets
fileOptions |
@NotNull BStatsOptions |
fileOptions(@NotNull java.util.function.Consumer<AnnoyingResource.Options> consumer)
Sets
fileOptions using the specified Consumer |
@NotNull BStatsOptions |
id(@Nullable java.lang.Integer id)
Sets
id |
static @NotNull BStatsOptions |
load(@NotNull org.bukkit.configuration.ConfigurationSection section)
Loads the options from the specified
ConfigurationSection |
@NotNull BStatsOptions |
toggleKey(@NotNull java.lang.String toggleKey)
Sets
toggleKey |
@Nullable public @Nullable java.lang.Integer id
@NotNull public @NotNull java.lang.String fileName
REQUIRED The name of the file to use for the bStats toggle
This 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 toggleKey for a boolean to toggle bStats. If it doesn't, bStats will always be disabled
@Nullable public AnnoyingResource.Options fileOptions
@NotNull public @NotNull java.lang.String toggleKey
OPTIONAL The key for the node people can change to toggle bStats in the bStats filepublic BStatsOptions()
BStatsOptions instance with default values@NotNull public static @NotNull BStatsOptions load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section)
ConfigurationSectionsection - the section to load the options from@NotNull public @NotNull BStatsOptions id(@Nullable @Nullable java.lang.Integer id)
idid - the new idBStatsOptions instance for chaining@NotNull public @NotNull BStatsOptions fileName(@NotNull @NotNull java.lang.String fileName)
fileNamefileName - the new fileNameBStatsOptions instance for chaining@NotNull public @NotNull BStatsOptions fileOptions(@Nullable AnnoyingResource.Options fileOptions)
fileOptionsfileOptions - the new fileOptionsBStatsOptions instance for chaining@NotNull public @NotNull BStatsOptions fileOptions(@NotNull @NotNull java.util.function.Consumer<AnnoyingResource.Options> consumer)
fileOptions using the specified Consumerconsumer - the Consumer to accept the new fileOptionsBStatsOptions instance for chaining@NotNull public @NotNull BStatsOptions toggleKey(@NotNull @NotNull java.lang.String toggleKey)
toggleKeytoggleKey - the new toggleKeyBStatsOptions instance for chaining