Record Class Settings

java.lang.Object
java.lang.Record
de.eldoria.schematicsanitizer.sanitizer.settings.Settings
Record Components:
filter - filter
limit - limit

public record Settings(Filter filter, Limit limit) extends Record
Represents settings for a Sanitizer.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Settings
    Default settings for a certain feature.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Settings(Filter filter, Limit limit)
    Creates an instance of a Settings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the filter record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the limit record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final Settings DEFAULT
      Default settings for a certain feature.

      This constant represents the default settings for the feature. It is a static final variable of type Settings. The settings are constructed using a SettingsBuilder, which allows for configuring various filters and limits. Here is a breakdown of the default settings:

      Filters: - Block Filter: Allows blocking certain block types based on their materials. The following materials are blacklisted: - COMMAND_BLOCK - REPEATING_COMMAND_BLOCK - CHAIN_COMMAND_BLOCK - STRUCTURE_BLOCK - Entity Filter: Allows filtering entities based on their types. The following entities are blacklisted: - COMMAND_BLOCK_MINECART - FALLING_BLOCK - POTION - Text Blacklist: Contains a list of blacklisted text entries. The following entries are blacklisted: - "clickEvent" - "run_command" - NBT Blacklist: Contains a list of blacklisted NBT tags. The following tags are blacklisted: - "LootTable" - "ArmorItem" - "ArmorItems" - "HandItem" - "HandItems" - "FireworksItem" - "Item" - "Items" - "DecorItem" - "Inventory" - "buy" - "buyB" - "sell" - "SaddleItem"

      Limits: - Size Limit: Specifies the maximum size of the feature. The size is set to 600. - Content Limit: Specifies the maximum limits for different types of content within the feature: - Blocks: Limited to 50000. - Creatures: Limited to 50. - Non-Creatures: Limited to 600.

      See Also:
  • Constructor Details

    • Settings

      public Settings(Filter filter, Limit limit)
      Creates an instance of a Settings record class.
      Parameters:
      filter - the value for the filter record component
      limit - the value for the limit record component
  • Method Details

    • builder

      public static SettingsBuilder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • filter

      public Filter filter()
      Returns the value of the filter record component.
      Returns:
      the value of the filter record component
    • limit

      public Limit limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component