All Downloads are FREE. Search and download functionalities are using the official Maven repository.

walkmc.extensions.Senders.kt Maven / Gradle / Ivy

@file:Suppress("NOTHING_TO_INLINE")

package walkmc.extensions

import org.bukkit.*
import org.bukkit.command.*

/**
 * Sends a message to this command sender.
 */
inline 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.
 */
inline fun CommandSender.dispatchCommand(command: String) = Bukkit.dispatchCommand(this, command)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy