Class FamiUtils

java.lang.Object
me.fami6xx.rpuniverse.core.misc.utils.FamiUtils

public class FamiUtils extends Object
  • Constructor Details

    • FamiUtils

      public FamiUtils()
  • Method Details

    • format

      public static String format(String message)
      Format the message
      Parameters:
      message - The message to format
      Returns:
      The formatted message
    • formatWithPrefix

      public static String formatWithPrefix(String message)
      Format the message with the prefix
      Parameters:
      message - The message to format
      Returns:
      The formatted message
    • replace

      public static String replace(String message, HashMap<String,​String> replace)
      Replace the message
      Parameters:
      message - The message to replace
      replace - The replace map
      Returns:
      The replaced message
    • replaceAndFormat

      public static String replaceAndFormat(String message, HashMap<String,​String> replace)
      Replace the message and format it
      Parameters:
      message - The message to replace
      replace - The replace map
      Returns:
      The formatted message
    • sendMessageWithPrefix

      public static void sendMessageWithPrefix(org.bukkit.entity.Player player, String message)
      Send a message to the player with the prefix
      Parameters:
      player - The player to send the message to
      message - The message to send
    • sendMessageWithPrefix

      public static void sendMessageWithPrefix(org.bukkit.entity.Player player, String message, HashMap<String,​String> replace)
      Send a message to the player with the prefix
      Parameters:
      player - The player to send the message to
      message - The message to send
      replace - The replace map
    • sendMessageInRange

      public static void sendMessageInRange(org.bukkit.entity.Player player, String message, int range)
      Send a message to the player in a range
      Parameters:
      player - The player to send the message to
      message - The message to send
      range - The range to send the message to
    • sendMessageInRange

      public static void sendMessageInRange(org.bukkit.entity.Player player, String message, int range, HashMap<String,​String> replace)
      Send a message to the player in a range
      Parameters:
      player - The player to send the message to
      message - The message to send
      range - The range to send the message to
      replace - The replace map
    • isInteger

      public static boolean isInteger(String s)
      Check if the string is an integer
      Parameters:
      s - The string to check
      Returns:
      True if the string is an integer, false otherwise
    • sendMessage

      public static void sendMessage(org.bukkit.entity.Player player, String message)
      Send a message to the player
      Parameters:
      player - The player to send the message to
      message - The message to send
    • makeItem

      public static org.bukkit.inventory.ItemStack makeItem(org.bukkit.Material material, String displayName, String... lore)
      Create an item with the given material, display name and lore
      Parameters:
      material - The material of the item
      displayName - The display name of the item
      lore - The lore of the item
      Returns:
      The created item
    • isDoubleChest

      public static boolean isDoubleChest(org.bukkit.block.Block block)
      Check if the block is a double chest
      Parameters:
      block - The block to check
      Returns:
      True if the block is a double chest, false otherwise
    • getOtherChestBlock

      @Nullable public static org.bukkit.block.Block getOtherChestBlock(org.bukkit.block.Block chestBlock)
      Get the other chest block
      Parameters:
      chestBlock - The chest block to get the other chest block from
      Returns:
      The other chest block
    • isDoubleDoor

      public static boolean isDoubleDoor(org.bukkit.block.Block block)
      Check if the block is a double door
      Parameters:
      block - The block to check
      Returns:
      True if the block is a double door, false otherwise
    • addGlow

      public static org.bukkit.inventory.ItemStack addGlow(org.bukkit.inventory.ItemStack item)
      Make the item glow
      Parameters:
      item - The item to make glow
      Returns:
      The glowing item
    • makeSkullItem

      public static org.bukkit.inventory.ItemStack makeSkullItem(org.bukkit.OfflinePlayer owner, String displayName, String... lore)
      Creates a skull item with the given owner, display name, and lore.
      Parameters:
      owner - The owner of the skull
      displayName - The display name of the skull
      lore - The lore of the skull
      Returns:
      The created skull item