Class ConfigSection

java.lang.Object
org.kingdoms.utils.config.ConfigSection

public class ConfigSection extends Object
  • Field Details

    • key

      protected final org.snakeyaml.nodes.ScalarNode key
    • root

      protected final org.snakeyaml.nodes.MappingNode root
  • Constructor Details

    • ConfigSection

      public ConfigSection(org.snakeyaml.nodes.ScalarNode key, org.snakeyaml.nodes.MappingNode root)
    • ConfigSection

      public ConfigSection(org.snakeyaml.nodes.MappingNode root)
    • ConfigSection

      public ConfigSection(org.snakeyaml.nodes.NodePair pair)
  • Method Details

    • empty

      public static ConfigSection empty()
    • getKeys

      @NotNull @Deprecated public @NotNull Set<String> getKeys(boolean deep)
      Deprecated.
    • getNode

      public org.snakeyaml.nodes.MappingNode getNode()
    • getName

      @NotNull public @NotNull String getName()
    • getKey

      public org.snakeyaml.nodes.ScalarNode getKey()
    • getKeys

      @NotNull public @NotNull Set<String> getKeys()
    • getCurrentNode

      public org.snakeyaml.nodes.MappingNode getCurrentNode()
    • getSections

      @NotNull public @NotNull Map<String,ConfigSection> getSections()
    • getValues

      @NotNull public @NotNull Map<String,Object> getValues(boolean deep)
    • getMathExpression

      public org.kingdoms.utils.compilers.MathCompiler.Expression getMathExpression(String path)
    • getTime

      public Long getTime(String path, PlaceholderContextProvider ctx)
    • getCondition

      public ConditionalCompiler.LogicalOperand getCondition(String path)
    • getPair

      public org.snakeyaml.nodes.NodePair getPair(String path)
    • getNode

      public org.snakeyaml.nodes.Node getNode(String path)
    • isSet

      public boolean isSet(@NotNull @NotNull String path)
    • isSet

      public boolean isSet(@NotNull @NotNull String... path)
    • get

      @Nullable public @Nullable Object get(@NotNull @NotNull String... path)
    • getString

      @Nullable public @Nullable String getString(@NotNull @NotNull String... path)
    • getString

      @Nullable public @Nullable String getString(@NotNull @NotNull String path)
    • getInt

      public int getInt(@NotNull @NotNull String... path)
    • getBoolean

      public boolean getBoolean(@NotNull @NotNull String... path)
    • getDouble

      public double getDouble(@NotNull @NotNull String... path)
    • getLong

      public long getLong(@NotNull @NotNull String... path)
    • getFloat

      public float getFloat(@NotNull @NotNull String... path)
    • get

      public <T> T get(org.kingdoms.utils.config.NodeInterpreter<T> interpreter, String path)
    • get

      public <T> T get(org.kingdoms.utils.config.NodeInterpreter<T> interpreter, org.kingdoms.utils.config.NodeInterpretContext<T> ctx, String path)
    • getStringList

      @NotNull public @NotNull List<String> getStringList(@NotNull @NotNull String... path)
    • getIntegerList

      @NotNull public @NotNull List<Integer> getIntegerList(@NotNull @NotNull String... path)
    • getSection

      public ConfigSection getSection(@NotNull @NotNull String... path)
    • findNode

      public org.snakeyaml.nodes.Node findNode(String[] sections)
    • traverseNodePairs

      public Pair<ConfigSection,org.snakeyaml.nodes.NodePair> traverseNodePairs(String[] sections, boolean createIfDoesntExist)
    • set

      public org.snakeyaml.nodes.NodePair set(String key, Object obj)
      Parameters:
      key - The single key to the node.
      obj - one of null: Removes the entry entirely. Node Sets the node without modification. else: Any other object attempted to be convert to a node. Doesn't support Maps.
      See Also:
    • set

      public Pair<ConfigSection,org.snakeyaml.nodes.NodePair> set(String[] key, Object obj)
    • createSection

      public ConfigSection createSection(String... path)
    • createSection

      public Pair<ConfigSection,org.snakeyaml.nodes.NodePair> createSection(String[] path, Object val)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • findNode

      public org.snakeyaml.nodes.Node findNode(String path)
    • toBukkitConfigurationSection

      public @NonNull org.bukkit.configuration.ConfigurationSection toBukkitConfigurationSection()
    • getConfigurationSection

      @Nullable public @Nullable org.bukkit.configuration.ConfigurationSection getConfigurationSection(@NotNull @NotNull String path)