
net.chestmc.common.extensions.Senders.kt Maven / Gradle / Ivy
package net.chestmc.common.extensions
import org.bukkit.Bukkit
import org.bukkit.command.CommandSender
/**
* Sends a message to this command sender.
*/
fun CommandSender.log(message: Any) = sendMessage("$message")
/**
* Sends all specifieds messages to this command sender.
*/
fun CommandSender.log(vararg messages: Any) {
for (message in messages)
sendMessage("$message")
}
/**
* Sends all specifieds messages to this command sender.
*/
fun CommandSender.log(messages: Iterable) {
for (message in messages)
sendMessage("$message")
}
/**
* Makes this command sender dispatchs a command.
*/
fun CommandSender.dispatchCommand(command: String) = Bukkit.dispatchCommand(this, command)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy