Added simple builder function for NamespacedKey

This commit is contained in:
bluefireoly
2020-10-28 21:13:56 +01:00
parent f89b71e323
commit bf2d8ee1a1

View File

@@ -1,6 +1,8 @@
package net.axay.kspigot.extensions
import net.axay.kspigot.main.KSpigotMainInstance
import org.bukkit.Bukkit
import org.bukkit.NamespacedKey
import org.bukkit.entity.Player
/**
@@ -32,4 +34,9 @@ fun broadcast(msg: String) = Bukkit.broadcastMessage(msg)
* Shortcut to get the ConsoleSender.
* @see Bukkit.getConsoleSender
*/
val console get() = Bukkit.getConsoleSender()
val console get() = Bukkit.getConsoleSender()
/**
* Shortcut for creating a new [NamespacedKey]
*/
fun pluginKey(key: String) = NamespacedKey(KSpigotMainInstance, key)