Package dev.jaims.mcutils.bukkit.func

Functions

async
Link copied to clipboard
Executes the given block via the plugin asynchronous.
fun async(plugin: KotlinPlugin, delayTicks: Long, repeatingTicks: Long, block: () -> Unit): BukkitTask
colorize
Link copied to clipboard
A chat colorization util that supports hex and PlaceholderAPI placeholders for a player if one is provided.
fun String.colorize(player: Player?): String
Colorize a list of strings
fun List<String>.colorize(player: Player?): List<String>
feed
Link copied to clipboard
Feed a Player Default for newFood is 20
fun Player.feed(newFood: Int): Player
heal
Link copied to clipboard
Heal a Damageable entity. Default for newHealth is 20
fun Damageable.heal(newHealth: Double): Damageable
inRadiusOfLocation
Link copied to clipboard
Check if a player is within a certain radius of an org.bukkit.Location
fun Entity.inRadiusOfLocation(location: Location, radius: Int): Boolean
kill
Link copied to clipboard
Kill a Damageable entity
fun Damageable.kill(): Damageable
log
Link copied to clipboard
fun String.log(severity: Severity)
send
Link copied to clipboard
Sends a message to a player or a commandsender.
fun CommandSender.send(message: String, player: Player?)
Send multiple messsages at once to a commandsender or player
fun CommandSender.send(messages: List<String>, player: Player?)
Send a message to a list of command senders
fun <T : CommandSender> List<T>.send(message: String, player: Player?)
Send a list of messages to a list of players
fun <T : CommandSender> MutableList<T>.send(messages: List<String>, player: Player?)
sync
Link copied to clipboard
Executes the given block via the plugin synchronized with the server tick.
fun sync(plugin: KotlinPlugin, delayTicks: Long, repeatingTicks: Long, block: () -> Unit): BukkitTask

Properties

pattern
Link copied to clipboard
A regular expression for hex chat.
val pattern: Regex