Class BStatsOptions


  • public class BStatsOptions
    extends xyz.srnyx.javautilities.parents.Stringable
    Represents the options for bStats
    • Field Detail

      • id

        @Nullable
        public @Nullable java.lang.Integer id
        RECOMMENDED The ID of the plugin on bStats

        If not specified, bStats metrics will not be enabled

      • fileName

        @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

      • toggleKey

        @NotNull
        public @NotNull java.lang.String toggleKey
        OPTIONAL The key for the node people can change to toggle bStats in the bStats file
    • Constructor Detail

      • BStatsOptions

        public BStatsOptions()
        Constructs a new BStatsOptions instance with default values
    • Method Detail

      • load

        @NotNull
        public static @NotNull BStatsOptions load​(@NotNull
                                                  @NotNull org.bukkit.configuration.ConfigurationSection section)
        Loads the options from the specified ConfigurationSection
        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)
        Sets id
        Parameters:
        id - the new id
        Returns:
        the BStatsOptions instance for chaining
      • fileName

        @NotNull
        public @NotNull BStatsOptions fileName​(@NotNull
                                               @NotNull java.lang.String fileName)
        Parameters:
        fileName - the new fileName
        Returns:
        the BStatsOptions instance for chaining