Fix start errors

This commit is contained in:
TDSTOS
2025-12-12 05:12:09 +01:00
parent 1acb5681fc
commit bb47145a73
16 changed files with 200 additions and 61 deletions

View File

@@ -36,6 +36,7 @@ import net.kyori.adventure.text.Component
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
import net.luckperms.api.LuckPerms
import org.bukkit.Bukkit
import org.bukkit.entity.Player
import org.bukkit.plugin.java.JavaPlugin
class SpeedHG : JavaPlugin() {
@@ -83,16 +84,16 @@ class SpeedHG : JavaPlugin() {
{
instance = this
loadConfigurations()
setupDatabase()
networkManager = SpigotNetworkManager.getInstance()!!
worldManager = WorldManager( this )
worldManager.deleteWorld()
}
override fun onEnable()
{
loadConfigurations()
setupDatabase()
networkManager = SpigotNetworkManager.getInstance()!!
worldManager.setupWorld()
chatFormatter = ChatFormatter.create(
@@ -150,6 +151,18 @@ class SpeedHG : JavaPlugin() {
getCommand("kits")?.setExecutor(KitsCommand( this, kitInventoryManager ))
}
fun getAlivePlayers(): List<Player>
{
val alivePlayers = mutableListOf<Player>()
runBlocking {
val players = playerRepository.findAlivePlayers( server.name )
alivePlayers.addAll(players.map { Bukkit.getPlayer( it.uuid )!! })
}
return alivePlayers
}
/*
* LUCKPERMS >>
*/