Class CSUtils

java.lang.Object
com.ryandw11.structure.utils.CSUtils

public class CSUtils extends Object
General utilities for Custom Structures.
  • 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

      public static void renameConfigString(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
    • renameConfigBoolean

      public static void renameConfigBoolean(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
    • renameConfigInteger

      public static void renameConfigInteger(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
    • renameConfigStringList

      public static void renameConfigStringList(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
    • renameStringConfigurationSection

      public static void renameStringConfigurationSection(org.bukkit.configuration.ConfigurationSection configurationSection, String originalName, String newName)
    • isPairInRange

      public static boolean isPairInRange(Pair<Integer,​Integer> pair, int value)
      Check if an integer is in a range.
      Parameters:
      pair - The range.
      value - The integer.
      Returns:
      If the integer is in the range.
    • isPairInLocalRange

      public static boolean isPairInLocalRange(Pair<Integer,​Integer> pair, int localPin, int value)
      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.