Class ConfigurationUtility


  • public class ConfigurationUtility
    extends java.lang.Object
    Utility methods for relationships between ConfigurationSections and Maps
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull org.bukkit.configuration.MemoryConfiguration toConfiguration​(@NotNull java.util.Map<?,​?> map)
      Converts a Map to a MemoryConfiguration
      static @NotNull java.util.List<org.bukkit.configuration.MemoryConfiguration> toConfigurationList​(@NotNull java.util.List<java.util.Map<?,​?>> maps)
      Converts a List of Maps to a List of MemoryConfigurations
      static @NotNull java.util.Map<java.lang.String,​java.lang.Object> toMap​(@NotNull org.bukkit.configuration.ConfigurationSection section)
      Converts a ConfigurationSection to a Map
      static @NotNull java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> toMapList​(@NotNull java.util.List<org.bukkit.configuration.ConfigurationSection> sections)
      Converts a List of ConfigurationSections to a List of Maps
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toConfiguration

        @NotNull
        public static @NotNull org.bukkit.configuration.MemoryConfiguration toConfiguration​(@NotNull
                                                                                            @NotNull java.util.Map<?,​?> map)
        Converts a Map to a MemoryConfiguration
        Parameters:
        map - the map to convert
        Returns:
        the converted configuration section
      • toConfigurationList

        @NotNull
        public static @NotNull java.util.List<org.bukkit.configuration.MemoryConfiguration> toConfigurationList​(@NotNull
                                                                                                                @NotNull java.util.List<java.util.Map<?,​?>> maps)
        Converts a List of Maps to a List of MemoryConfigurations
        Parameters:
        maps - the maps to convert
        Returns:
        the converted configuration sections
      • toMap

        @NotNull
        public static @NotNull java.util.Map<java.lang.String,​java.lang.Object> toMap​(@NotNull
                                                                                            @NotNull org.bukkit.configuration.ConfigurationSection section)
        Converts a ConfigurationSection to a Map
        Parameters:
        section - the section to convert
        Returns:
        the converted map
      • toMapList

        @NotNull
        public static @NotNull java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> toMapList​(@NotNull
                                                                                                                @NotNull java.util.List<org.bukkit.configuration.ConfigurationSection> sections)
        Converts a List of ConfigurationSections to a List of Maps
        Parameters:
        sections - the sections to convert
        Returns:
        the converted maps