Added simple builder function for NamespacedKey
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package net.axay.kspigot.extensions
|
package net.axay.kspigot.extensions
|
||||||
|
|
||||||
|
import net.axay.kspigot.main.KSpigotMainInstance
|
||||||
import org.bukkit.Bukkit
|
import org.bukkit.Bukkit
|
||||||
|
import org.bukkit.NamespacedKey
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,4 +34,9 @@ fun broadcast(msg: String) = Bukkit.broadcastMessage(msg)
|
|||||||
* Shortcut to get the ConsoleSender.
|
* Shortcut to get the ConsoleSender.
|
||||||
* @see Bukkit.getConsoleSender
|
* @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)
|
Reference in New Issue
Block a user