Package com.ryandw11.structure.utils
Class CSUtils
java.lang.Object
com.ryandw11.structure.utils.CSUtils
General utilities for Custom Structures.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPairInLocalRange(Pair<Integer,Integer> pair, int localPin, int value)Check if an integer is in a local range.static booleanisPairInRange(Pair<Integer,Integer> pair, int value)Check if an integer is in a range.static voidrenameConfigBoolean(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)static voidrenameConfigInteger(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)static voidrenameConfigString(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)static voidrenameConfigStringList(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)static voidrenameStringConfigurationSection(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)static StringreplacePlaceHolders(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.
-