Class Util
java.lang.Object
net.playavalon.mythicdungeons.utility.Util
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
static Date
convertDurationString
(String durString) static boolean
convertFromDXL
(String worldName) static boolean
deleteRecursively
(File folder) static void
displayHelpMenu
(org.bukkit.command.CommandSender sender, int page) static boolean
forceRunCommand
(org.bukkit.entity.Player player, String fullCommand) static String
formatDate
(Date date) static String
formatDuration
(long durationInMillis) static String
static org.bukkit.inventory.ItemStack
static org.bukkit.inventory.ItemStack
static String
getEntityGroup
(org.bukkit.entity.LivingEntity ent) static org.bukkit.inventory.ItemStack
static Timestamp
getFutureTime
(int minutes) static Timestamp
getFutureTimeInSeconds
(int seconds) static String
getItemDisplayName
(org.bukkit.inventory.ItemStack item) static String
getMythicItemType
(org.bukkit.inventory.ItemStack item) static org.bukkit.inventory.ItemStack
getPlayerHead
(org.bukkit.entity.Player player) static List<org.bukkit.entity.Player>
getPlayersWithin
(org.bukkit.Location loc, double radius) static List<org.bukkit.entity.Player>
getPlayersWithin
(org.bukkit.Location loc, double radius, org.bukkit.GameMode... gameModes) static boolean
getRandomBoolean
(double chance) static int
getRandomNumberInRange
(int min, int max) static void
giveOrDrop
(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) static void
giveOrDrop
(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack... items) static void
giveOrDropSilently
(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) static boolean
hasPermission
(org.bukkit.command.CommandSender sender, String node) static boolean
hasPermissionSilent
(org.bukkit.command.CommandSender sender, String node) static org.bukkit.Color
hexToColor
(String colorStr) static boolean
isFunctionTool
(org.bukkit.inventory.ItemStack item) static boolean
isItemBanned
(Dungeon dungeon, org.bukkit.inventory.ItemStack itemStack) static boolean
isPlayerWithin
(org.bukkit.entity.Player player, org.bukkit.Location loc, double radius) static boolean
isPlayerWithin
(org.bukkit.Location loc) readDoubleInput
(org.bukkit.entity.Player player, String string) readIntegerInput
(org.bukkit.command.CommandSender sender, String string) static org.bukkit.Location
readLocation
(org.bukkit.configuration.ConfigurationSection config) static double
round
(double value, int places) static void
sendClickableCommand
(org.bukkit.entity.Player player, String message, String command) static void
sendClickableLink
(org.bukkit.entity.Player player, String message, String url) static void
sendReadyCheckMessage
(org.bukkit.entity.Player player) static org.bukkit.inventory.ItemStack
skullFromName
(org.bukkit.inventory.ItemStack item, String name) static boolean
verifyDungeonItem
(org.bukkit.inventory.ItemStack item) static boolean
verifyKeyItem
(org.bukkit.inventory.ItemStack item) static void
writeLocation
(String path, org.bukkit.configuration.ConfigurationSection config, org.bukkit.Location loc)
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
colorize
-
fullColor
-
hasPermission
-
hasPermissionSilent
-
round
public static double round(double value, int places) -
getRandomNumberInRange
public static int getRandomNumberInRange(int min, int max) -
getRandomBoolean
public static boolean getRandomBoolean(double chance) -
getFutureTime
-
getFutureTimeInSeconds
-
giveOrDrop
public static void giveOrDrop(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) -
giveOrDrop
public static void giveOrDrop(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack... items) -
giveOrDropSilently
public static void giveOrDropSilently(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack item) -
getEntityGroup
-
getFunctionTool
public static org.bukkit.inventory.ItemStack getFunctionTool() -
isFunctionTool
public static boolean isFunctionTool(org.bukkit.inventory.ItemStack item) -
getDefaultKeyItem
public static org.bukkit.inventory.ItemStack getDefaultKeyItem() -
verifyKeyItem
public static boolean verifyKeyItem(org.bukkit.inventory.ItemStack item) -
verifyDungeonItem
public static boolean verifyDungeonItem(org.bukkit.inventory.ItemStack item) -
convertFromDXL
-
getItemDisplayName
-
isItemBanned
-
isPlayerWithin
public static boolean isPlayerWithin(org.bukkit.Location loc) -
isPlayerWithin
public static boolean isPlayerWithin(org.bukkit.entity.Player player, org.bukkit.Location loc, double radius) -
getPlayersWithin
public static List<org.bukkit.entity.Player> getPlayersWithin(org.bukkit.Location loc, double radius) -
getPlayersWithin
public static List<org.bukkit.entity.Player> getPlayersWithin(org.bukkit.Location loc, double radius, org.bukkit.GameMode... gameModes) -
readIntegerInput
-
readDoubleInput
-
sendClickableLink
-
sendClickableCommand
-
sendReadyCheckMessage
public static void sendReadyCheckMessage(org.bukkit.entity.Player player) -
hexToColor
-
getBlockedMenuItem
public static org.bukkit.inventory.ItemStack getBlockedMenuItem() -
forceRunCommand
-
displayHelpMenu
public static void displayHelpMenu(org.bukkit.command.CommandSender sender, int page) -
deleteRecursively
-
formatDate
-
convertDurationString
-
formatDuration
-
getMythicItemType
-
skullFromName
public static org.bukkit.inventory.ItemStack skullFromName(org.bukkit.inventory.ItemStack item, String name) -
readLocation
public static org.bukkit.Location readLocation(org.bukkit.configuration.ConfigurationSection config) -
writeLocation
public static void writeLocation(String path, org.bukkit.configuration.ConfigurationSection config, org.bukkit.Location loc) -
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(org.bukkit.entity.Player player)
-