Class ConfigManager

java.lang.Object
de.maxbossing.maxapi.UTils.ConfigManager

public class ConfigManager extends Object
Config Manager
Author:
max
  • Constructor Details

    • ConfigManager

      public ConfigManager(org.bukkit.plugin.java.JavaPlugin plugin, String path)
      Create a configuration object, with the yaml configuration file.
      Parameters:
      plugin - The plugin for the configuration.
      path - The path to the configuration.
  • Method Details

    • createFile

      public boolean createFile() throws IOException
      Create file
      Returns:
      boolean
      Throws:
      IOException - execption
    • get

      public Object get(String path)
      get Object
      Parameters:
      path - - path
      Returns:
      Object
    • set

      public void set(String path, Object o, boolean save)
      set object at path
      Parameters:
      path - - path
      o - - object
      save - - save
    • save

      public void save() throws IOException
      save file
      Throws:
      IOException - exeption
    • exists

      public boolean exists(String path)
      check if file exists
      Parameters:
      path - - path
      Returns:
      true if yes
    • getString

      public String getString(String path)
      get String from location
      Parameters:
      path - - path
      Returns:
      String
    • getBoolean

      public boolean getBoolean(String path)
      get boolean from location
      Parameters:
      path - - path
      Returns:
      boolean
    • getChar

      public char getChar(String path)
      get char from location
      Parameters:
      path - - path
      Returns:
      char
    • getByte

      public byte getByte(String path)
      get byte from location
      Parameters:
      path - - path
      Returns:
      byte
    • getShort

      public short getShort(String path)
      get SHort from Location
      Parameters:
      path - - path
      Returns:
      short
    • getInt

      public int getInt(String path)
      get int from Location
      Parameters:
      path - - path
      Returns:
      int
    • getLong

      public long getLong(String path)
      get Long from location
      Parameters:
      path - - path
      Returns:
      long
    • getFloat

      public float getFloat(String path)
      get Float from Location
      Parameters:
      path - - path
      Returns:
      float
    • getDouble

      public double getDouble(String path)
      get Double from Location
      Parameters:
      path - - path
      Returns:
      Double
    • getStringList

      public List<String> getStringList(String path)
      get List of String from Location
      Parameters:
      path - - path
      Returns:
      List
    • getBooleanList

      public List<Boolean> getBooleanList(String path)
      get List of Boolean from location
      Parameters:
      path - - path
      Returns:
      List
    • getCharList

      public List<Character> getCharList(String path)
      get List of Characters from location
      Parameters:
      path - - path
      Returns:
      List
    • getByteList

      public List<Byte> getByteList(String path)
      get List of Byte from location
      Parameters:
      path - - path
      Returns:
      List
    • getShortList

      public List<Short> getShortList(String path)
      get List of Shorts from location
      Parameters:
      path - - path
      Returns:
      List
    • getIntList

      public List<Integer> getIntList(String path)
      get List of Integers from location
      Parameters:
      path - - path
      Returns:
      List
    • getLongList

      public List<Long> getLongList(String path)
      get List of Longs from location
      Parameters:
      path - - path
      Returns:
      List
    • getFloatList

      public List<Float> getFloatList(String path)
      get List of Floats from Location
      Parameters:
      path - - path
      Returns:
      List
    • getDoubleList

      public List<Double> getDoubleList(String path)
      get List of Doubles from location
      Parameters:
      path - - path
      Returns:
      List
    • getStringArray

      public String[] getStringArray(String path)
      get Array of Strings from Location
      Parameters:
      path - - path
      Returns:
      String[]
    • getBooleanArray

      public boolean[] getBooleanArray(String path)
      get Array of booleans from location
      Parameters:
      path - - path
      Returns:
      boolean[]
    • getCharArray

      public char[] getCharArray(String path)
      get Array of Chars from location
      Parameters:
      path - - path
      Returns:
      char[]
    • getByteArray

      public byte[] getByteArray(String path)
      get Array of Bytes from Loaction
      Parameters:
      path - - path
      Returns:
      byte[]
    • getShortArray

      public short[] getShortArray(String path)
      get Array of Shorts from location
      Parameters:
      path - - path
      Returns:
      short[]
    • getIntArray

      public int[] getIntArray(String path)
      get Array of ints form location
      Parameters:
      path - - path
      Returns:
      int[]
    • getLongArray

      public long[] getLongArray(String path)
      get Array of longs from Location
      Parameters:
      path - - path
      Returns:
      long[]
    • getFloatArray

      public float[] getFloatArray(String path)
      get Array of floats from location
      Parameters:
      path - - path
      Returns:
      float[]
    • getDoubleArray

      public double[] getDoubleArray(String path)
      get Array of Doubles from location
      Parameters:
      path - - path
      Returns:
      double[]
    • getLocation

      public org.bukkit.Location getLocation(String path)
      get Location from location
      Parameters:
      path - - path
      Returns:
      Location
    • getInventory

      public org.bukkit.inventory.Inventory getInventory(String path)
      get Inventory from Location
      Parameters:
      path - - path
      Returns:
      Inventory
    • getItemStack

      public org.bukkit.inventory.ItemStack getItemStack(String path)
      get ItemStack from location
      Parameters:
      path - - path
      Returns:
      ItemStack
    • getLocationList

      public List<org.bukkit.Location> getLocationList(String path)
      get List of Locations from location
      Parameters:
      path - - path
      Returns:
      Location
    • getInventoryList

      public List<org.bukkit.inventory.Inventory> getInventoryList(String path)
      get List of Inventorys from Location
      Parameters:
      path - - path
      Returns:
      Inventory
    • getItemStackList

      public List<org.bukkit.inventory.ItemStack> getItemStackList(String path)
      get List of ItemStacks from location
      Parameters:
      path - - path
      Returns:
      ItemStack
    • getLocationArray

      public org.bukkit.Location[] getLocationArray(String path)
      get Location Array from location
      Parameters:
      path - - path
      Returns:
      Location
    • getInventoryArray

      public org.bukkit.inventory.Inventory[] getInventoryArray(String path)
      get Inventory Array from Location
      Parameters:
      path - - path
      Returns:
      Inventory
    • getItemStackArray

      public org.bukkit.inventory.ItemStack[] getItemStackArray(String path)
      get ItemStack Array from location
      Parameters:
      path - - path
      Returns:
      ItemStack