Utils

object Utils

Holds common utilities

Author

lokka30, stumper66

Since

2.5.0

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun adaptVanillaSpawnReason(spawnReason: CreatureSpawnEvent.SpawnReason): LevelledMobSpawnReason
Link copied to clipboard

Puts the string into lowercase and makes every character that starts a word a capital letter.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun displayChunkLocation(location: Location): String
Link copied to clipboard
fun filterPlayersList(entities: MutableList<Player>, mob: LivingEntity, maxDistance: Double?): MutableList<Player>
Link copied to clipboard
fun getChunkKey(chunk: Chunk): Long
Link copied to clipboard
Link copied to clipboard
@Contract(value = "_, _ -> new", pure = true)
fun <T, U> getPair(first: T, second: U): Map.Entry<T, U>
Link copied to clipboard
Link copied to clipboard
fun isBiomeInModalList(list: CachedModalList<Biome>, biome: Biome, rulesManager: RulesManager): Boolean
Link copied to clipboard
fun isDouble(str: String?): Boolean
Link copied to clipboard

Check if str is an integer

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun parseTimeUnit(input: String?, defaultTime: Long?, useMS: Boolean, sender: CommandSender?): Long?
Link copied to clipboard
Link copied to clipboard
fun replaceAllInList(oldList: MutableList<String>, replaceWhat: String, replaceTo: String?): MutableList<String>
Link copied to clipboard
fun replaceEx(message: String, replaceWhat: String, replaceTo: String): String

Replaces content of a message with case insensitivity.

Link copied to clipboard
fun round(value: Double): Double

Rounds value to 2 decimal points.

fun round(value: Double, digits: Int): Double
Link copied to clipboard