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 Set<String> getKeys(boolean deep)
      Deprecated.
    • getNode

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

      @NotNull public String getName()
    • getKey

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

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

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

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

      @NotNull public 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 String path)
    • isSet

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

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

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

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

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

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

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

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

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

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

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

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

      public ConfigSection getSection(@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.kingdoms.utils.config.BukkitConfigSection toBukkitConfigurationSection()
    • getConfigurationSection

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