Class PipesConfig

java.lang.Object
io.github.apfelcreme.Pipes.PipesConfig

public class PipesConfig
extends Object
  • Constructor Details

  • Method Details

    • load

      public static void load()
      loads the config
    • getPipeCacheDuration

      public static long getPipeCacheDuration()
      returns the time that the cache stores all the locations of pipes
      Returns:
      the delay of pipe recalculation in s
    • getPipeCacheSize

      public static long getPipeCacheSize()
      returns the amount of locations to store in the cache
      Returns:
      the amount of locations to store
    • getTransferCooldown

      public static long getTransferCooldown()
      returns the delay between item transfers
      Returns:
      the delay between item transfers
    • getInputToOutputRatio

      public static double getInputToOutputRatio()
      returns the ratio of inputs to outputs for a pipe's transfer, 0 for unlimited
      Returns:
      the ratio of inputs to outputs for a pipe's transfer, 0 for unlimited
    • getMaxPipeOutputs

      public static int getMaxPipeOutputs()
      returns the maximum number of outputs a pipe can have
      Returns:
      the maximum number of outputs a pipe can have
    • getMaxPipeLength

      public static int getMaxPipeLength()
      returns the maximum length of a pipe
      Returns:
      the maximum length of a pipe
    • isPistonCheckEnabled

      public static boolean isPistonCheckEnabled()
      returns whether or not piston checking is enabled
      Returns:
      whether or not piston checking is enabled
    • getCustomModelDataOffset

      public static int getCustomModelDataOffset()
      returns the offset for the custom model data of the items
      Returns:
      the custom model data offset
    • getRecipeMaterials

      public static Map<org.bukkit.Material,​Integer> getRecipeMaterials​(String path)
      returns the materials and their quantity for a custom recipe
      Parameters:
      path - The config path
      Returns:
      the materials and their quantity for a custom recipe
    • getText

      public static String getText​(String key, String... replacements)
      returns a texty string
      Parameters:
      key - the config path
      replacements - the replacements as an array of alternating placeholder and value
      Returns:
      the text
    • getGuiItemStack

      public static org.bukkit.inventory.ItemStack getGuiItemStack​(String key)
      Get the ItemStack from the GUI config
      Parameters:
      key - The key, all parts get checked.
      Returns:
      The ItemStack or placeholder. Never null.
    • getItemStack

      public static org.bukkit.inventory.ItemStack getItemStack​(String key)
      Get the ItemStack from the GUI config
      Parameters:
      key - The literal key
      Returns:
      The ItemStack or placeholder. Never null.