use the adventure api

- migrate BungeeCord Chat API to Adventure API
- add some functions to literalText
- update some dependencies and plugins
This commit is contained in:
l4zs
2022-01-08 22:30:09 +01:00
parent 6bacddfdb5
commit 9c008dcba4
11 changed files with 156 additions and 84 deletions

View File

@@ -1,6 +1,9 @@
@file:Suppress("Unused")
package net.axay.kspigot.extensions
import net.axay.kspigot.main.PluginInstance
import net.kyori.adventure.text.Component.text
import org.bukkit.Bukkit
import org.bukkit.NamespacedKey
import org.bukkit.World
@@ -36,7 +39,7 @@ val pluginManager get() = Bukkit.getPluginManager()
* @return the number of recipients
* @see Bukkit.broadcastMessage
*/
fun broadcast(msg: String) = Bukkit.broadcastMessage(msg)
fun broadcast(msg: String) = Bukkit.getServer().broadcast(text(msg))
/**
* Shortcut to get the ConsoleSender.