Class FamiUtils
java.lang.Object
me.fami6xx.rpuniverse.core.misc.utils.FamiUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStackaddGlow(org.bukkit.inventory.ItemStack item)Make the item glowstatic StringFormat the messagestatic StringformatWithPrefix(String message)Format the message with the prefixstatic org.bukkit.block.BlockgetOtherChestBlock(org.bukkit.block.Block chestBlock)Get the other chest blockstatic booleanisDoubleChest(org.bukkit.block.Block block)Check if the block is a double cheststatic booleanisDoubleDoor(org.bukkit.block.Block block)Check if the block is a double doorstatic booleanCheck if the string is an integerstatic org.bukkit.inventory.ItemStackCreate an item with the given material, display name and lorestatic org.bukkit.inventory.ItemStackmakeSkullItem(org.bukkit.OfflinePlayer owner, String displayName, String... lore)Creates a skull item with the given owner, display name, and lore.static StringReplace the messagestatic StringreplaceAndFormat(String message, HashMap<String,String> replace)Replace the message and format itstatic voidsendMessage(org.bukkit.entity.Player player, String message)Send a message to the playerstatic voidsendMessageInRange(org.bukkit.entity.Player player, String message, int range)Send a message to the player in a rangestatic voidsendMessageInRange(org.bukkit.entity.Player player, String message, int range, HashMap<String,String> replace)Send a message to the player in a rangestatic voidsendMessageWithPrefix(org.bukkit.entity.Player player, String message)Send a message to the player with the prefixstatic voidsendMessageWithPrefix(org.bukkit.entity.Player player, String message, HashMap<String,String> replace)Send a message to the player with the prefix
-
Constructor Details
-
FamiUtils
public FamiUtils()
-
-
Method Details
-
format
Format the message- Parameters:
message- The message to format- Returns:
- The formatted message
-
formatWithPrefix
Format the message with the prefix- Parameters:
message- The message to format- Returns:
- The formatted message
-
replace
Replace the message- Parameters:
message- The message to replacereplace- The replace map- Returns:
- The replaced message
-
replaceAndFormat
Replace the message and format it- Parameters:
message- The message to replacereplace- The replace map- Returns:
- The formatted message
-
sendMessageWithPrefix
Send a message to the player with the prefix- Parameters:
player- The player to send the message tomessage- 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 tomessage- The message to sendreplace- The replace map
-
sendMessageInRange
Send a message to the player in a range- Parameters:
player- The player to send the message tomessage- The message to sendrange- 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 tomessage- The message to sendrange- The range to send the message toreplace- The replace map
-
isInteger
Check if the string is an integer- Parameters:
s- The string to check- Returns:
- True if the string is an integer, false otherwise
-
sendMessage
Send a message to the player- Parameters:
player- The player to send the message tomessage- 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 itemdisplayName- The display name of the itemlore- 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 skulldisplayName- The display name of the skulllore- The lore of the skull- Returns:
- The created skull item
-