Package com.ryandw11.structure.utils
Class CSUtils
java.lang.Object
com.ryandw11.structure.utils.CSUtils
General utilities for Custom Structures.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isPairInLocalRange(Pair<Integer,Integer> pair, int localPin, int value)
Check if an integer is in a local range.static boolean
isPairInRange(Pair<Integer,Integer> pair, int value)
Check if an integer is in a range.static void
renameConfigBoolean(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
static void
renameConfigInteger(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
static void
renameConfigString(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
static void
renameConfigStringList(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
static void
renameStringConfigurationSection(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
static String
replacePlaceHolders(String command, org.bukkit.Location signLocation, org.bukkit.Location minLoc, org.bukkit.Location maxLoc, Structure structure)
Replace the placeholders on commands in the command group.
-
Constructor Details
-
CSUtils
public CSUtils()
-
-
Method Details
-
replacePlaceHolders
public static String replacePlaceHolders(String command, org.bukkit.Location signLocation, org.bukkit.Location minLoc, org.bukkit.Location maxLoc, Structure structure)Replace the placeholders on commands in the command group.- Parameters:
command
- The command.signLocation
- The location of the sign.minLoc
- The minimum location of the structure.maxLoc
- The maximum location of the structure.structure
- The structure.- Returns:
- The command with the placeholders replaced.
-
renameConfigString
-
renameConfigBoolean
-
renameConfigInteger
-
renameConfigStringList
-
renameStringConfigurationSection
-
isPairInRange
Check if an integer is in a range.- Parameters:
pair
- The range.value
- The integer.- Returns:
- If the integer is in the range.
-
isPairInLocalRange
Check if an integer is in a local range.- Parameters:
pair
- The local range.localPin
- The pin that will be added to the local range.value
- The integer.- Returns:
- If the integer is within the local range.
-