Package io.github.apfelcreme.Pipes
Class PipesConfig
java.lang.Object
io.github.apfelcreme.Pipes.PipesConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
returns the offset for the custom model data of the itemsstatic String
returns the configured default localestatic org.bukkit.inventory.ItemStack
getGuiItemStack
(String key) Get the ItemStack from the GUI configstatic double
returns the ratio of inputs to outputs for a pipe's transfer, 0 for unlimitedstatic org.bukkit.inventory.ItemStack
getItemStack
(String key) Get the ItemStack from the GUI configstatic int
returns the maximum length of a pipestatic int
returns the maximum number of outputs a pipe can havestatic long
returns the time that the cache stores all the locations of pipesstatic long
returns the amount of locations to store in the cachegetRecipeMaterials
(String path) returns the materials and their quantity for a custom recipestatic String
returns a texty stringstatic String
returns a texty stringstatic long
returns the delay between item transfersstatic double
returns the max amount of item stacks transfered per pipe transferstatic boolean
returns whether or not piston checking is enabledstatic void
load()
loads the config
-
Constructor Details
-
PipesConfig
public PipesConfig()
-
-
Method Details
-
load
public static void load()loads the config -
getDefaultLocale
returns the configured default locale- Returns:
- the default locale
-
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
-
getTransferCount
public static double getTransferCount()returns the max amount of item stacks transfered per pipe transfer- Returns:
- the max amount of item stacks transfered per pipe transfer
-
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
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(org.bukkit.command.CommandSender sender, String key, String... replacements) returns a texty string- Parameters:
sender
- the sender to get the locale forkey
- the config pathreplacements
- the replacements as an array of alternating placeholder and value- Returns:
- the text
-
getText
returns a texty string- Parameters:
locale
- the locale to usekey
- the config pathreplacements
- the replacements as an array of alternating placeholder and value- Returns:
- the text
-
getGuiItemStack
Get the ItemStack from the GUI config- Parameters:
key
- The key, all parts get checked.- Returns:
- The ItemStack or placeholder. Never null.
-
getItemStack
Get the ItemStack from the GUI config- Parameters:
key
- The literal key- Returns:
- The ItemStack or placeholder. Never null.
-